On Monday 15 May 2006 14:40, Smith, Derek wrote:
> I have this system output
>
>
>
> --- Logical volumes ---
>
> LV Name /dev/vg00/lvol1
>
> VG Name /dev/vg00
>
>
> And I have this multiple lvols populated into 2 arrays like printed like
> so:
>
>
>
> Mirr
>Jeff Pang wrote:
>
>: my @original=(...);
>: my @sort=sort {$a cmp $b} @original;
>: print Dumper @sort;
>
>You might like the results better using an array reference.
>
>print Dumper [EMAIL PROTECTED];
>
Sorry,my mistake.It's right really to use an array reference here.
--
Jeff Pang
NetEas
Jeff Pang wrote:
: my @original=(...);
: my @sort=sort {$a cmp $b} @original;
: print Dumper @sort;
You might like the results better using an array reference.
print Dumper [EMAIL PROTECTED];
Or you could avoid the extra array with the anonymous array
constructor (or is it an operator?
>
>I've got a *bunch* of code that I've been rewriting recently and ran
>into a rather weird problem.
>
>it won't fork.
>
>If I write the following:
>
>foreach my $file ( @$files ) {
> my $pid = fork();
> print "$pid --> $file\n";
> []
>}
>
>I will get an output of:
>0 --> file_one
>3242 --
>
>I get data from Data::Dumper in an array format.
>I just wonder if there is a means to format the
>content in alphabetic order, something like "sort keys
>or sort values".
I would give you a simple way,you can sort the array and put the results into
another array,then print this array to Dump
If you want to see the status messages coming in to get a better idea of
what to send, try running this on a computer and point a few of your Big
Brother agents at it for a while. You should end up with a separate log
file for each incoming status message.
NOTE: Watch for line wraps
##
Hi all,
I get data from Data::Dumper in an array format.
I just wonder if there is a means to format the
content in alphabetic order, something like "sort keys
or sort values".
Thanks,
Li
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best
>On 5/15/06, Smith, Derek <[EMAIL PROTECTED]> wrote:
> I tried an push @mir2 => (unless /lv\d+/i, `lvdisplay $lv`); in place
of
> the third push
>
> But that gave me an error: Uncaught exception from user code:
>
>syntax error at HPUX_verify_system.pl line 127, near "(unless"
I had to deal with some of this when I recently wrote a BB agent to
Nagios translator in Perl.
You should be able to send the information you want directly to BB using
the IO::Socket module, connecting to port 1984( or whatever custom port)
on your BB server and sending a status message.
Big B
I am a novice to perl,I would like to learn perl in a systematic way,
Whats the best way to start with,I dont have any experience of
programming Language, But I came to know that perl is a Good
Programming Language
Whether or not you do choose to use a book or not, remember: always
try doing som
On 5/15/06, Smith, Derek <[EMAIL PROTECTED]> wrote:
I tried an push @mir2 => (unless /lv\d+/i, `lvdisplay $lv`); in place of
the third push
But that gave me an error: Uncaught exception from user code:
syntax error at HPUX_verify_system.pl line 127, near "(unless"
Yes; that's a syntax
tom arnall wrote:
[...]
why does '(m{0,1})' produce an empty scalar, while '(m){0,1}' an undefined
scalar?
and what i'm really after is to say:
($f,$g,$h)=/(a{0,1})(m|mn){0,1}(b{1,1})/;
and have $g come out a scalar which is defined.
Use the grouping syntax to group togeth
On 5/15/06, Tom Allison <[EMAIL PROTECTED]> wrote:
my $pid = fork();
print "$pid --> $file\n";
Because your process table can become full and temporarily prevent
forking new processes, you should check the return value of fork
whenever you're making more than N processes. The value of N de
I have this system output
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency RecoveryMWC
Schedule
tom arnall wrote:
> the following script:
>
> my ($f,$g,$h);
> $_= "abcde";
> ($f,$g,$h)=/(a{0,1})(m{0,1})(b{0,1})/;
> print "scalar g defined after first regex\n" if defined $g;
> ($f,$g,$h)=/(a{0,1})(m){0,1}(b{0,1})/;
> print "scalar g defined after second reg
Mock, George wrote:
Hello!
When I try this on Unix, it runs pretty fast ...
spew_10MB_or_more | perl my_script.pl
This finishes in seconds, even though the command spew_10MB_or_more
creates very large text files that often exceed 10 MB. When I do the
same thing on a DOS shell under Window
On Mon, May 15, 2006 at 04:46:07PM -0400, Tom Allison wrote:
> I've got a *bunch* of code that I've been rewriting recently and ran
> into a rather weird problem.
>
> it won't fork.
>
> If I write the following:
>
> foreach my $file ( @$files ) {
> my $pid = fork();
> print "$pid --> $file\
the following script:
my ($f,$g,$h);
$_= "abcde";
($f,$g,$h)=/(a{0,1})(m{0,1})(b{0,1})/;
print "scalar g defined after first regex\n" if defined $g;
($f,$g,$h)=/(a{0,1})(m){0,1}(b{0,1})/;
print "scalar g defined after second regex\n" if defined $g;
I've got a *bunch* of code that I've been rewriting recently and ran
into a rather weird problem.
it won't fork.
If I write the following:
foreach my $file ( @$files ) {
my $pid = fork();
print "$pid --> $file\n";
[]
}
I will get an output of:
0 --> file_one
3242 --> file_one
0--> fi
Hello,
Can someone please point me to a module that will
enable me to capture the process and memory info
normally displayed in the Windows task manager?
Thanks, BW
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
ht
Hello,
This is my first mail to the group. Let me introduce myself. I am Deep,
currently working as a Tech Support Engineer in India. I am new to Perl and
CGI.I have a few questions regarding the configuration of Apache Server on a
Windows 2000 Server? I faced the following issues when I was tr
On Mon, May 15, 2006 at 12:07:42AM -0500, Sumo Wrestler (or just ate too much)
wrote:
> Chad Perrin wrote:
> >[...]
> >I'm still curious about why exec cgi works for a page generated
> >entirely by the CGI script, but not for CGI script output that I want to
> >include in the middle of a page of o
On Mon, May 15, 2006 at 08:38:23AM +0200, Bjørge Solli wrote:
>
> Have you considered trying mod_rewrite? Your host may have it if it runs
> apache.
>
> Try using something like this in your .htaccess-file:
> RewriteEngine on
> RewriteRule ^$ cgi-bin/foo.pl
>
> I use this to avoid ugly urls lik
--- Kaushal Shriyan <[EMAIL PROTECTED]> wrote:
> Hi All
>
> I am a novice to perl,I would like to learn perl in
> a systematic way,
> Whats the best way to start with,I dont have any
> experience of
> programming Language, But I came to know that perl
> is a Good
> Programming Language
Try Learn
Hello!
When I try this on Unix, it runs pretty fast ...
spew_10MB_or_more | perl my_script.pl
This finishes in seconds, even though the command spew_10MB_or_more
creates very large text files that often exceed 10 MB. When I do the
same thing on a DOS shell under Windows XP, it takes minutes
Hi i`m new in perl world
I use Glade(Gtk2) to design GUI and glede2perl to translate c code to
perl code, but i can`t from TextFIeld "imeTF" get value and put to $ime.
Does somebody have some tutorial for this?
Sory english is not my strong side
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
When I run the following script from the command line, I get different
output than when I run it with the debugger.
#!/usr/bin/perl
use Config qw(myconfig);
print Config->myconfig;
1;
Here is the relevant differences in the output:
>From the debugger:
uname='linux lxcert-i386.cern.ch 2.4.21-27.
Chad Perrin wrote:
[...]
I'm still curious about why exec cgi works for a page generated
entirely by the CGI script, but not for CGI script output that I want to
include in the middle of a page of otherwise fairly mundane markup.
Since that's really the most on-topic part of my question for this
28 matches
Mail list logo