Re: passing arguments to perl function with - in the string

2011-11-29 Thread Peter Scott
On Tue, 29 Nov 2011 18:19:59 -0500, Nemana, Satya wrote: > P.S : unfortunately, I cant provide more details due to the IP > restrictions, sorry about that, hope you understand, otherwise would > have posted the code in the first go. This is a common constraint. You can always post a version of th

Re: extracting email addresses from a file

2011-11-29 Thread Rob Dixon
On 29/11/2011 15:13, Rajeev Prasad wrote: hello, i am trying to extract email address from a afile, but not quite succesful. here is what i have: the file: myterqlqt qntmrq Prqtesm qltul qzeez Smqik qltulqzee...@jmqil.com 976665 myterqlqt qntmrq Prqtesm teepqk Mittql teep...@jmqil.com 939383 O

Re: sprintf function

2011-11-29 Thread Dr.Ruud
On 2011-11-29 14:49, Chris Stinemetz wrote: How can I check that the value assigned to $cell and $sector is numeric before I try to call the sprintf function? I am just trying to clear this warning. Argument "" isn't numeric in sprintf at ./rt_evdo_pcmd.pl line 139,<$FIN> line 119503. line

RE: passing arguments to perl function with - in the string

2011-11-29 Thread Nemana, Satya
Hi Brandon, Igor, Shawn Thank you very much for your replies. Appreciate your time and help. I later realized that the error was creeping not due to the - or any other character in the string, but a ' character that was introduced at the end of the line by mistake. The horror was that the perl co

Re: sprintf function

2011-11-29 Thread John W. Krahn
Chris Stinemetz wrote: How can I check that the value assigned to $cell and $sector is numeric before I try to call the sprintf function? I am just trying to clear this warning. Argument "" isn't numeric in sprintf at ./rt_evdo_pcmd.pl line 139,<$FIN> line 119503. line 139 is from my program

Re: extracting email addresses from a file

2011-11-29 Thread Rajeev Prasad
thx Sheppy, good enough for me. i am a beginner in perl. From: Sheppy R To: Rob Coops Cc: Rajeev Prasad ; perl list Sent: Tuesday, November 29, 2011 9:54 AM Subject: Re: extracting email addresses from a file Couldn't you just use the non-whitespace charact

Re: extracting email addresses from a file

2011-11-29 Thread Rob Coops
On Tue, Nov 29, 2011 at 4:54 PM, Sheppy R wrote: > Couldn't you just use the non-whitespace character to capture everything > before and after the @ symbol? > > s/^.*\s(\S+@\S+)\s.*$/$1/ > > > Yes you could of course but... this is why I was saying nearly no syntax checking... the minor check to

Re: extracting email addresses from a file

2011-11-29 Thread Sheppy R
Couldn't you just use the non-whitespace character to capture everything before and after the @ symbol? s/^.*\s(\S+@\S+)\s.*$/$1/

Re: extracting email addresses from a file

2011-11-29 Thread Rob Coops
On Tue, Nov 29, 2011 at 4:13 PM, Rajeev Prasad wrote: > hello, > > i am trying to extract email address from a afile, but not quite > succesful. here is what i have: > > the file: > myterqlqt qntmrq Prqtesm qltul qzeez Smqik qltulqzee...@jmqil.com 976665 > myterqlqt qntmrq Prqtesm teepqk Mittql t

extracting email addresses from a file

2011-11-29 Thread Rajeev Prasad
hello,   i am trying to extract email address from a afile, but not quite succesful. here is what i have:   the file: myterqlqt qntmrq Prqtesm qltul qzeez Smqik qltulqzee...@jmqil.com 976665 myterqlqt qntmrq Prqtesm teepqk Mittql teep...@jmqil.com 939383 Onjole qntmrq Prqtesm lmqrqtm Etqrq cont.

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Brandon McCaig
On Tue, Nov 29, 2011 at 08:12:29AM -0500, Nemana, Satya wrote: > Hi Hello: > I need to pass argument to a function like this -chan_range => > "$chs-$che" > > Normally when this used which works -chan_range => "1-24" > > However, when I try to put variable values instead of a scalar string, I

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Shawn H Corey
On 11-11-29 08:12 AM, Nemana, Satya wrote: However, when I try to put variable values instead of a scalar string, I get compilation errors (the errors are in different part of the code which is completely clueless) Could you post the code that fails and its error message? -- Just my 0.000

Re: sprintf function

2011-11-29 Thread Shlomi Fish
Hi Chris, On Tue, 29 Nov 2011 07:49:37 -0600 Chris Stinemetz wrote: > How can I check that the value assigned to $cell and $sector is numeric > before I try to call the sprintf function? > > I am just trying to clear this warning. > > Argument "" isn't numeric in sprintf at ./rt_evdo_pcmd.pl

Re: sprintf function

2011-11-29 Thread Igor Dovgiy
googlesh "perl is_numeric" => http://www.perlmonks.org/?node_id=609478 qq{ Scalar::Util provides access to the underlying Perl API looks_like_number routine which Perl itself uses internally. } 2011/11/29 Chris Stinemetz > How can I check that t

sprintf function

2011-11-29 Thread Chris Stinemetz
How can I check that the value assigned to $cell and $sector is numeric before I try to call the sprintf function? I am just trying to clear this warning. Argument "" isn't numeric in sprintf at ./rt_evdo_pcmd.pl line 139, <$FIN> line 119503. line 139 is from my program is below: my $c_s = spr

Re: passing arguments to perl function with - in the string

2011-11-29 Thread Igor Dovgiy
Hi Satya, Might I suggest to look up a bit into the function's source code? Because it's, well, pretty normal to call subs like that: ... some_func_call(-chan_range => "$beg-$end") ... Of course, $beg and $end variables should be defined already (and contain numeric values, as I see). If not, war

passing arguments to perl function with - in the string

2011-11-29 Thread Nemana, Satya
Hi Sorry for the silly question, but thought someone might help here.(tried googling but this may too silly a beginners question for anyone to have answered previously) I need to pass argument to a function like this -chan_range => "$chs-$che" Normally when this used which works -chan_range

Re: Perl module for Gmail

2011-11-29 Thread Peter Scott
On Sun, 20 Nov 2011 12:27:31 -0800, samjesse wrote: > I need a Perl script which will connect to my gmail and download the > unread emails from a certain folder. But not all the unread emails, only > those with a certain subjects and from a certain sender. after that mark > them as read and leave t