Re: pipe as an argument

2006-09-05 Thread jeffhua
Don't write it like this.Consider this case: $ARGV[0] ==0; then your statement : my $time_in = $ARGV[0] || ; should be broken. --Jeff Pang -Original Message- From: [EMAIL PROTECTED] To: beginners@perl.org Sent: Wed, 6 Sep 2006 1:58 PM Subject: Re: pipe as an argument On 9/6/06, [EM

Re: pipe as an argument

2006-09-05 Thread Budi Milis
On 9/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Consider this: my $arg = @ARGV ? shift @ARGV : ; Works as I expected, many thanks. However, my previous code was: my $time_in = $ARG[0] || ; and it doesn't work, why and whats the different with yours? rgds, -- To unsubscribe, e-mail:

Re: pipe as an argument

2006-09-05 Thread jeffhua
HI, Change this line: my $time_in = $ARGV[0]; to: my $time_in = ; --Jeff Pang -Original Message- From: [EMAIL PROTECTED] To: beginners@perl.org Sent: Wed, 6 Sep 2006 12:54 PM Subject: pipe as an argument All,    How do accept pipe as an valid argument in perl, for example:    echo 1234

pipe as an argument

2006-09-05 Thread Budi Milis
All, How do accept pipe as an valid argument in perl, for example: echo 123456 | ./convert_time.pl convert_time.pl: #!/usr/bin/perl use POSIX qw(strftime); my $time_in = $ARGV[0]; my $time_out = strftime "%Y%m%d", localtime($time_in); print "$time_out\n"; rgrds, -- To unsubscribe, e-mail: [

Re: Image/Magick - Blurring

2006-09-05 Thread Owen Cook
On Tue, 5 Sep 2006, Mike Blezien wrote: > Owen, > - Original Message - > From: "Owen Cook" <[EMAIL PROTECTED]> > To: "Mike Blezien" <[EMAIL PROTECTED]> > Cc: "Perl List" > Sent: Tuesday, September 05, 2006 7:11 PM > Subject: Re: Image/Magick - Blurring > > > > > > On Tue, 5 Sep 2006,

Re: Image/Magick - Blurring

2006-09-05 Thread Mike Blezien
Owen, - Original Message - From: "Owen Cook" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: "Perl List" Sent: Tuesday, September 05, 2006 7:11 PM Subject: Re: Image/Magick - Blurring On Tue, 5 Sep 2006, Mike Blezien wrote: Hello, I'm using the Image::Magick module

Re: Image/Magick - Blurring

2006-09-05 Thread Owen Cook
On Tue, 5 Sep 2006, Mike Blezien wrote: > Hello, > > I'm using the Image::Magick module and need to slight Blur a PNG image. > > my $imagepng = '/path/to/image.png'; > > my $image = Image::Magick->new(); > $image->Read($imagepng); > > # Now create image with Blur $image->Blur(geometr

Image/Magick - Blurring

2006-09-05 Thread Mike Blezien
Hello, I'm using the Image::Magick module and need to slight Blur a PNG image. my $imagepng = '/path/to/image.png'; my $image = Image::Magick->new(); $image->Read($imagepng); # Now create image with Blur __END__ But haven't come up with the proper coding to blur the image, then create t

Re: how to delete elements in AoA

2006-09-05 Thread chen li
Hi guys, Thank you all for the input and this is a summary email. Question: How to paste data into a CGI script and then delete empty elements in AoA pasted data format: 1 1 1 2 2 2 3 3 3 expected AoA ([1,1,1], [2,2,2], [3,3,3], ); script/answer: my $cgi=CGI->new(); my $

Re: Extract digits from string

2006-09-05 Thread Dr.Ruud
john wright schreef: > I have a data in a variable like > $data="book(18614)---book2.2(18616)---book3(18617)---book4(14432) > . so on" i want to store all digit value lying between ( > ) into an array. $array[0]=18614 > $array[1]=18616 > $array[2]=18617 ... so on @array = $d

Re: Create HTML code with perl

2006-09-05 Thread Cristi Ocolisan
Hi Adilson, Try this: print qq{ Tste Tste Tste Tste }; But I think you should try to find other ways too... Hope it helps, CO > Hi All > > > > I need print HTML codes with perl: > > > > > > > > Tste > > Tste > > > > > > Tste > >

Re: Extract digits from string

2006-09-05 Thread Jeff Pang
Hi,how about this? my @array = $data =~ /\((\d+)\)/g; -Original Message- >From: john wright <[EMAIL PROTECTED]> >Sent: Sep 5, 2006 11:29 AM >To: beginners@perl.org >Subject: Extract digits from string > >Hi, > I have a data in a variable like > $data="book(18614)---book2.2(18616)---book

Extract digits from string

2006-09-05 Thread john wright
Hi, I have a data in a variable like $data="book(18614)---book2.2(18616)---book3(18617)---book4(14432) . so on" i want to store all digit value lying between ( ) into an array. $array[0]=18614 $array[1]=18616 $array[2]=18617 ... so on Can someone help please? Thanks

Re: RegEx: finding a string that does not contain /<(w ...(-...)?|c ...)>/

2006-09-05 Thread D. Bolliger
Stefan Th. Gries am Dienstag, 5. September 2006 14:20: > Hi all Hallo Stefan > I have a regex question I can't solve. I know this is a realy long posting > but in order to explain the problem, I first say what I can do and then > what I can't. Any ideas, pointers, snippets of code etc. would be r

RegEx: finding a string that does not contain /<(w ...(-...)?|c ...)>/

2006-09-05 Thread Stefan Th. Gries
Hi all I have a regex question I can't solve. I know this is a realy long posting but in order to explain the problem, I first say what I can do and then what I can't. Any ideas, pointers, snippets of code etc. would be really appreciated ... Thx, STG I.This I can do

Re: word counting

2006-09-05 Thread Mumia W.
On 09/05/2006 03:47 AM, Andrew Kennard wrote: Hi all I'm looking for a good word counting module/sub routine I've found this so far http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=562&lngWId=6 but it counts things like the "Item1,Item2,Item3" as one word I've had a searc

Re: word counting

2006-09-05 Thread Dr.Ruud
"Andrew Kennard" schreef: > I need a word counter to count the number of words in a scientific > paper. I know it wont be 100% accurate due to formulas etc echo 'I,Item1,Item2,Item3,a' | sed 's/[^A-Za-z0-9]/ /g' | wc If you want to count only strings with a specific minimum length, use `st

word counting

2006-09-05 Thread Andrew Kennard
Hi all I'm looking for a good word counting module/sub routine I've found this so far http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=562&lngWId=6 but it counts things like the "Item1,Item2,Item3" as one word I've had a search on CPAN but that did not result in any at all ?

Remving unnecessary data

2006-09-05 Thread Geetha Weerasooriya
Dear Mr. Dani, Thank you so much for the perl script and for your kindness. It seems you have taken great trouble to help me. It will be very much helpful to me. I am really thankful to you. I will try that script and let you know the result. Thanks again, Kind regards, Geetha

Re: can't print to STDOUT on 5.8.4

2006-09-05 Thread Mumia W.
On 09/05/2006 12:50 AM, Michael Alipio wrote: Hi, I was running this command on my perl program, open FLOWTOOLS, "|/usr/bin/flow-cat $start | /usr/bin/flow-nfilter -f filter.tmp -F $direction |/usr/bin/flow-stat -Pf8 | le ss" or die $!; It does output something on the screen when I run it on F