Re: hash assignments

2006-05-15 Thread Jaime Murillo
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

RE: format output from Data::Dumper

2006-05-15 Thread Jeff Pang
>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

RE: format output from Data::Dumper

2006-05-15 Thread Charles K. Clarkson
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?

Re: not forking

2006-05-15 Thread Jeff Pang
> >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 --

Re: format output from Data::Dumper

2006-05-15 Thread Jeff Pang
> >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

RE: :ftp with retry & Big brother notifications from applications

2006-05-15 Thread Timothy Johnson
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 ##

format output from Data::Dumper

2006-05-15 Thread chen li
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

RE: hash assignments

2006-05-15 Thread Smith, Derek
>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"

RE: :ftp with retry & Big brother notifications from applications

2006-05-15 Thread Timothy Johnson
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

Re: Hi

2006-05-15 Thread Leonid Grinberg
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

Re: hash assignments

2006-05-15 Thread Tom Phoenix
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

Re: want regex to produce a scalar which is defined when no match

2006-05-15 Thread Sumo Wrestler (or just ate too much)
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

Re: not forking

2006-05-15 Thread Tom Phoenix
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

hash assignments

2006-05-15 Thread Smith, Derek
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

Re: want regex to produce a scalar which is defined when no match

2006-05-15 Thread John W. Krahn
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

Re: Unix pipes vs DOS pipes

2006-05-15 Thread Sumo Wrestler (or just ate too much)
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

Re: not forking

2006-05-15 Thread Paul Johnson
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\

want regex to produce a scalar which is defined when no match

2006-05-15 Thread tom arnall
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;

not forking

2006-05-15 Thread Tom Allison
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

windows process+memory info

2006-05-15 Thread brian bwarn
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

Help needed to Execute CGI on a Apache Server?

2006-05-15 Thread sudeepta ganguly
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

Re: ssi and Perl/CGI

2006-05-15 Thread Chad Perrin
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

Re: ssi and Perl/CGI

2006-05-15 Thread Chad Perrin
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

Re: Hi

2006-05-15 Thread Ron Smith
--- 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

Unix pipes vs DOS pipes

2006-05-15 Thread Mock, George
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

New

2006-05-15 Thread Nenad
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]

Different output when run from the debugger vs. the command line

2006-05-15 Thread Shimon Bollinger
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.

Re: ssi and Perl/CGI

2006-05-15 Thread Sumo Wrestler (or just ate too much)
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