Hi,
I am writing a perl cgi program to get the status on page of all process
running on particluar m/c.
And then perform some action on those process but these process should get
displayed in pstree format in expand mode.
Has anybody done the same effort?
-Sharif
I'm back.
This is a piece of code taken from a larger program.
I'm trying to determine that the encryption succeded, but when
I try to evaluate the code, it always evaluates false even though
the encryption works and produces an encrypted file.
Here's the specific bit I'm concerned with:
if
check $? or $!
$gp-foo() or die $!;
my $output = $gp-foo();
print return code: $?;
see perldoc perlvar
On 5/25/06, Jason Balicki [EMAIL PROTECTED] wrote:
I'm back.
This is a piece of code taken from a larger program.
I'm trying to determine that the encryption succeded, but when
I try
ps...you're checking if it has a value, 256 (a typical error return
code) would pass that test.
On 5/25/06, Anthony Ettinger [EMAIL PROTECTED] wrote:
check $? or $!
$gp-foo() or die $!;
my $output = $gp-foo();
print return code: $?;
see perldoc perlvar
On 5/25/06, Jason Balicki [EMAIL
Hi
the format of split() defines that one
can split a string into a fixed number
of specifies strings. for eg
($login, $passwd, $remainder) = split(/:/, $_, 3);
Now, the thing is, it splits on first 3 parts.
Can i do the reverse?? as in instead of the output
being the first 3 parts of split,
- Original Message -
From: Saurabh Singhvi [EMAIL PROTECTED]
Newsgroups: perl.beginners
To: Perl FAq beginners@perl.org
Sent: Thursday, May 25, 2006 3:38 PM
Subject: split doubt
Hi
the format of split() defines that one
can split a string into a fixed number
of specifies strings.
On Thu, 2006-05-25 at 19:38 +, Saurabh Singhvi wrote:
Hi
the format of split() defines that one
can split a string into a fixed number
of specifies strings. for eg
($login, $passwd, $remainder) = split(/:/, $_, 3);
Now, the thing is, it splits on first 3 parts.
Can i do the
On Thu, 2006-25-05 at 13:17 -0700, Joshua Colson wrote:
On Thu, 2006-05-25 at 19:38 +, Saurabh Singhvi wrote:
Hi
the format of split() defines that one
can split a string into a fixed number
of specifies strings. for eg
($login, $passwd, $remainder) = split(/:/, $_, 3);
Saurabh Singhvi wrote:
Hi
Hello,
the format of split() defines that one
can split a string into a fixed number
of specifies strings. for eg
($login, $passwd, $remainder) = split(/:/, $_, 3);
Now, the thing is, it splits on first 3 parts.
Can i do the reverse?? as in instead of the
Jason Balicki wrote:
This is a piece of code taken from a larger program.
I'm trying to determine that the encryption succeded, but when
I try to evaluate the code, it always evaluates false even though
the encryption works and produces an encrypted file.
Here's the specific bit I'm
Hi all,
I've inherited a bunch of scripts that am spending lots of time debugging and
tracing, changing etc. Part of the task also is to have the same modified in
some way so that I can use it for both UNIX and Windows.
Lots of these scripts have system UNIX COMMAND on them which of course I
Do you have control over the Windows box you will be using for these
scripts, or are these for a general distribution?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 4:21 PM
To: beginners@perl.org; [EMAIL PROTECTED]
Subject: Perl OS
Hi,
What is the best way to only work with the first x number of elements in an
array?
At the moment this script prints the entire contents of @lines for each
element in @cfgs
I would like to restrict this to the number of elements listed in the hash
%numTapes for each element in @cfgs
Any
On Fri, 2006-05-26 at 09:45 +1000, Keenan, Greg John (Greg)** CTR **
wrote:
--start--
use strict;
use warnings;
my $cfgDir = '/amanda/admin/etc/amanda';
my @cfgs = qw(Toaster MFG-UNIX SYS-UNIX Amanda-Daily);
my %numTapes = (
$cfgs[0] = 6,
$cfgs[1] = 5,
$cfgs[2] = 5,
$cfgs[3]
Keenan, Greg John (Greg)** CTR ** wrote:
Hi,
Hello,
What is the best way to only work with the first x number of elements in an
array?
At the moment this script prints the entire contents of @lines for each
element in @cfgs
I would like to restrict this to the number of elements
Joshua Colson wrote:
On Fri, 2006-05-26 at 09:45 +1000, Keenan, Greg John (Greg)** CTR **
wrote:
my $cfg;
foreach $cfg (@cfgs) {
my $fileIn=$cfgDir/$cfg/tapelist;
open (FILEIN, $fileIn) or die (Could not open $fileIn: $!);
my @lines = reverse FILEIN;
my $line;
#foreach
On 5/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Lots of these scripts have system UNIX COMMAND on them which of course I
can't run on Windows. Can anyone suggest how to get around this? Or any white
papers on how to do this?
If you have sufficient access to the windows computers (and you
-Original Message-
From: Ricky Zhou [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 5:30 PM
To: [EMAIL PROTECTED]
Cc: beginners@perl.org; [EMAIL PROTECTED]
Subject: Re: Perl OS system equivalence or Perl scripts for
UNIX-and-Windows
On 5/25/06, [EMAIL PROTECTED] [EMAIL
Using an AoA:
for my $cfg ( @cfgs ) {
my $fileIn = $cfgDir/$cfg-[0]/tapelist;
open FILEIN, '', $fileIn or die Could not open $fileIn: $!;
print +( reverse FILEIN )[ -$cfg-[1] .. -1 ]; }
Using a hash:
for my $cfg ( keys %cfgs ) {
my $fileIn = $cfgDir/$cfg/tapelist;
open
[EMAIL PROTECTED] wrote:
Hi all,
Hello,
I've inherited a bunch of scripts that am spending lots of time debugging and
tracing, changing etc. Part of the task also is to have the same modified in
some way so that I can use it for both UNIX and Windows.
Lots of these scripts have system
John W. Krahn wrote:
Keenan, Greg John (Greg)** CTR ** wrote:
my $cfgDir = '/amanda/admin/etc/amanda';
my @cfgs = qw(Toaster MFG-UNIX SYS-UNIX Amanda-Daily);
my %numTapes = (
$cfgs[0] = 6,
$cfgs[1] = 5,
$cfgs[2] = 5,
$cfgs[3] = 1,
);
Do you really need an array and a hash? If you
Small correction: because of the hyphens those barewords need to be quoted.
my @cfgs = (
[ Toaster= 6 ],
[ 'MFG-UNIX' = 5 ],
[ 'SYS-UNIX' = 5 ],
[ 'Amanda-Daily' = 1 ],
);
my %cfgs = (
Toaster= 6,
'MFG-UNIX' = 5,
'SYS-UNIX' = 5,
Help: Is there any way to get the name of the Window Server that the
Perl script is currently running on?
Thanks.
--
Besh wishes,
Japerlh
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Many thanks to all you guys.
...
On 5/25/06, Paul Johnson [EMAIL PROTECTED] wrote:
On Wed, May 24, 2006 at 05:18:46AM -0700, Leonid Grinberg wrote:
What about frozen bubble?
That was written in Perl? Really?
-Original Message-
From: Japerlh [mailto:[EMAIL PROTECTED]
Sent: Friday, 26 May 2006 11:21 AM
To: beginners
Subject: Help: Is there any way to get the name of the Window Server
that the Perl script is currently running on?
Help: Is there any way to get the name of the Window
There is a COMPUTERNAME environment variable that will have this info.
-Original Message-
From: Japerlh [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 6:21 PM
To: beginners
Subject: Help: Is there any way to get the name of the Window Server
that the Perl script is currently
On Fri, May 26, 2006 at 10:35:41AM +1000, Keenan, Greg John (Greg)** CTR **
wrote:
Using a hash:
for my $cfg ( keys %cfgs ) {
my $fileIn = $cfgDir/$cfg/tapelist;
open FILEIN, '', $fileIn or die Could not open $fileIn: $!;
print +( reverse FILEIN )[ -$cfg{$cfg} .. -1 ]; }
On 5/25/06, mohd sharif [EMAIL PROTECTED] wrote:
Hi,
I am writing a perl cgi program to get the status on page of all process
running on particluar m/c.
And then perform some action on those process but these process should get
displayed in pstree format in expand mode.
Has anybody done the
28 matches
Mail list logo