lettinf an external basgh command timeout inside eval

2009-10-21 Thread cerr
Hi, I wanna execute an external bash command but timeout if it's taking longer than XX seconds. I've tried it like this: eval { local $SIG{ALRM} = sub {die alarm\n}; alarm $timeout; $test = `$sshpassPATH . -p .$clientpw. ssh root@.$ip. . $RemcksumPATH. .$RemcksumPATH.

The Perl question of the here document

2009-10-21 Thread Majian
Dear list: Sorry to distrub all . When I learned Perl on the book called Perl by example 4th Chinese Edition , I found there was an error on this book . There had a perl script writted by this : #!/usr/bin/perl print 'END';

Re: The Perl question of the here document

2009-10-21 Thread John W. Krahn
Majian wrote: Dear list: Hello, Sorry to distrub all . When I learned Perl on the book called Perl by example 4th Chinese Edition , I found there was an error on this book . There had a perl script writted by this : #!/usr/bin/perl

newbie question : about the perl sprintf

2009-10-21 Thread Majian
Hi, all ; I want to print this sentence The number in scientific notation is 1.255000e+02. So I write a perl script like this : #!/usr/bin/perl sprintf The number in scientific notation is %e, 1.255; But the screen output is The

Re: lettinf an external basgh command timeout inside eval

2009-10-21 Thread Jim Gibson
At 3:59 PM -0700 10/20/09, cerr wrote: Hi, I wanna execute an external bash command but timeout if it's taking longer than XX seconds. I've tried it like this: eval { local $SIG{ALRM} = sub {die alarm\n}; alarm $timeout; $test = `$sshpassPATH . -p .$clientpw. ssh

Re: newbie question : about the perl sprintf

2009-10-21 Thread Jim Gibson
At 8:52 PM +0800 10/21/09, Majian wrote: Hi, all ; I want to print this sentence The number in scientific notation is 1.255000e+02. So I write a perl script like this : #!/usr/bin/perl sprintf The number in scientific notation is %e,

Re: newbie question : about the perl sprintf

2009-10-21 Thread Christian Bernini
sprintf The number in scientific notation is %e, 1.255; Sprintf doesn't print actually, it just returns a string based on the formats provided in the list you have. To actually print something you should use printf. printf The number in scientific notation is %e,1255; And the notation

[OT cpan] How to paginate cpan output when inside cpan shell

2009-10-21 Thread Harry Putnam
I'm sorry to bring this here.. I suppose there may be a more appropriate group... I don't know it if there it. When inside the cpan shell: How can I force the output of cpan cmds to run thru some kind of pager so that I can see page by page what the content is? -- To unsubscribe, e-mail:

File Help

2009-10-21 Thread Jyoti
Heya, Can anyone help me download my output results, please? I am actually doing my (Blast program) search and getting the output result files in my temporary folder, as I am told to do so. Now, how can I save that output file or download the file from my temporary folder. I have to save as when

Re: [OT cpan] How to paginate cpan output when inside cpan shell

2009-10-21 Thread Octavian Râsnita
From: Harry Putnam rea...@newsguy.com I'm sorry to bring this here.. I suppose there may be a more appropriate group... I don't know it if there it. When inside the cpan shell: How can I force the output of cpan cmds to run thru some kind of pager so that I can see page by page what the

Re: File Help

2009-10-21 Thread Jim Gibson
At 3:06 AM +0100 10/22/09, Jyoti wrote: Heya, Can anyone help me download my output results, please? I am actually doing my (Blast program) search and getting the output result files in my temporary folder, as I am told to do so. Now, how can I save that output file or download the file from my