foolprof regex

2006-12-19 Thread beast
Hi All, Basically I want these input : name= name= name= name = But I did not want these input: my name = name is = my name is = -- if ( /\s*name\s*=/) { print "Match: $_"; } did not works as i expected. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: perl script execution issue

2006-12-19 Thread pradeep reddy
Yes, you are right and It works both ways.. -Reddy. - Original Message From: Chad Perrin <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Wednesday, 20 December, 2006 12:37:00 AM Subject: Re: perl script execution issue On Tue, Dec 19, 2006 at 10:18:39PM +1100, Owen Cook wrote: > On T

HTML::TokeParser question

2006-12-19 Thread Mathew Snyder
I have a script which runs WWW::Mechanize to obtain a page so it can be parsed for email addresses. However, I can't recall how I'm supposed to use HTML::TokeParser to get what I need. This is the pertinent part of the script: ... my $data = $agent->content(); my $parse= new HTML::TokePa

Module for printing file with CUPS

2006-12-19 Thread Toddy Prawiraharjo
Hello all, I am starting to learn how to print via perl in linux. I have setup a network printer (using CUPS), which support TCP/IP and socket (9100). What module do i need, if necessary, to print a file using that printer? Thanks in advance Toddy -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Learning Perl books

2006-12-19 Thread Larry Johnson
Chad Perrin <[EMAIL PROTECTED]> wrote: >Interesting. I don't think I'd heard of Strawberry Perl before now. Do >you recommend it over ActiveState? >I may have to give it a try the next time I boot a Windows machine >(which means it may be a few months before I try it out I hadn't heard of it ei

Re: Learning Perl books

2006-12-19 Thread Chad Perrin
On Tue, Dec 19, 2006 at 09:08:11AM -0800, Randal L. Schwartz wrote: > > "Learning Perl on Win32 Systems" is still being published only because it > sells. It was based on the second edition of Learning Perl, which was clearly > Unix-bias. For the third and fourth editions of Learning Perl, we've

Re: perl script execution issue

2006-12-19 Thread Chad Perrin
On Tue, Dec 19, 2006 at 10:18:39PM +1100, Owen Cook wrote: > On Tue, Dec 19, 2006 at 03:48:49PM +0530, pradeep reddy wrote: > > Yes Ruud, I edited it in windows environment, as a text pad format, then I > > saved it. > > > > How can i correct this issue. > > > > -reddy. > > > At the prompt, ty

Re: find .| end of line

2006-12-19 Thread Mumia W.
On 12/19/2006 05:45 AM, Jack Daniels (Butch) wrote: Having a heck of a time Windows server Want to find all lines with .| at end of line Also, how would I replace .| with | My problem is when using \ to make | a regular character, it never works. file contains lines in this format joe|TK123

Re: Learning Perl books

2006-12-19 Thread Randal L. Schwartz
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: Rob> With regard to 'Learning Perl' and 'Learning Perl on Win32 Systems', can Rob> anybody who has read either or both of these books comment on their Rob> usefulness for an inexperienced programmer wishing to use Perl on a Rob> Windows platform

Re: reg exp continued need pulled from reference

2006-12-19 Thread oryann9
oryann9 <[EMAIL PROTECTED]> wrote: Here is my question I have a line of code like so: "$dub_key => $dub_values\n"; that prints dubhpr28.hpux => ARRAY(0x4002e1bc) but I want to have printed out the values contained in the $dub_values arrayref instead of its address. What do I have to c

Re: beginner on the windows platform

2006-12-19 Thread Wan
isaac vanderpuije 写道: i just installed the activeperl and dont know where to edit my source code (is it notepad? ) and where to run it.Can any one help me because i want to learn it bad. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best

Re: reg exp continued need pulled from reference

2006-12-19 Thread oryann9
Anyway. When you print $dub_values and it shows up as an array ref as ARRAY(0x4002c164) and you want the values of this arrayref, you have to dereference it in some way. Start with printing out @$dub_values. Or assign it before if you want bigger freedom to format the values: my @[EMAIL PRO

RE: Getopt::Std producing unexpected results

2006-12-19 Thread RICHARD FERNANDEZ
> Getopt::Std only works with single hyphen switches, the only > exceptions being '--', '--help' and '--version'. > > perldoc Getopt::Std > > > Getopt::Std also processes swithes in clusters so "-abcd > filename" is the same as "-a -b -c -d filename". > > > With your command line: > > ./

Re: reg exp continued need pulled from reference

2006-12-19 Thread oryann9
"D. Bolliger" <[EMAIL PROTECTED]> wrote:oryann9 am Montag, 18. Dezember 2006 19:52: > "D. Bolliger" wrote: [snipped] > How are my quesitons unclear??? [snipped] I answered offlist. Sorry to all for the noise of this notice. Dani *

Re: beginner on the windows platform

2006-12-19 Thread Larry Johnson
isaac vanderpuije <[EMAIL PROTECTED]> wrote: i just installed the activeperl and dont know where to edit my source code (is it notepad? ) and where to run it.Can any one help me because i want to learn it bad. You can use any editor which produces plain text, including notepad. I don't

Re: perl script execution issue

2006-12-19 Thread pradeep reddy
Its worked for me now. I run the following command on unix to convert. perl -i -pe 's/\x0d\x0a/\x0a/g' Thx all for your support. Thx Cook,Krishnan,Ruud. -reddy. - Original Message From: H Krishnan <[EMAIL PROTECTED]> To: pradeep reddy <[EMAIL PROTECTED]>; Dr.Ruud <[EMAIL PROTECTED]>

find .| end of line

2006-12-19 Thread Jack Daniels (Butch)
Having a heck of a time Windows server Want to find all lines with .| at end of line Also, how would I replace .| with | My problem is when using \ to make | a regular character, it never works. file contains lines in this format joe|TK123 .23 .B22 2004| joe|TK123 .23 .B22 2004.| -- To unsu

beginner on the windows platform

2006-12-19 Thread isaac vanderpuije
i just installed the activeperl and dont know where to edit my source code (is it notepad? ) and where to run it.Can any one help me because i want to learn it bad. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around

Re: perl script execution issue

2006-12-19 Thread pradeep reddy
Cook, I run the command what you sent.But still the same problem persists.I cant execute the script in linux machine directly by its name, by i can do it on windows machine.. -reddy. - Original Message From: Owen Cook <[EMAIL PROTECTED]> To: pradeep reddy <[EMAIL PROTECTED]> Cc: begi

Re: perl script execution issue

2006-12-19 Thread Owen Cook
On Tue, Dec 19, 2006 at 03:48:49PM +0530, pradeep reddy wrote: > Yes Ruud, I edited it in windows environment, as a text pad format, then I > saved it. > > How can i correct this issue. > > -reddy. At the prompt, type # perl -p -e 's/\r$//' < winfile.txt > unixfile.txt so if your script i

Re: perl script execution issue

2006-12-19 Thread pradeep reddy
Yes Ruud, I edited it in windows environment, as a text pad format, then I saved it. How can i correct this issue. -reddy. - Original Message From: Dr.Ruud <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Tuesday, 19 December, 2006 3:32:22 PM Subject: Re: perl script execution issue

Re: perl script execution issue

2006-12-19 Thread Dr.Ruud
pradeep reddy schreef: > The same perl script runs fine on windows environment. But on > linux machine its giving this problem. Did you edit it in a Windows environment? Then a bunch of CRs might have creeped in your script, corrupting your shebang and more. -- Affijn, Ruud "Gewoon is een tijg

Re: perl script execution issue

2006-12-19 Thread pradeep reddy
I did the samewhat you told, this time its says, "command not found".The same perl script runs fine on windows environment.But on linux machine its giving this problem.I have few other scripts, which are running fine with this environent both on linux and windows machines. -reddy. - Origi