![]() |
Perl Noob, regex
I just started Perl and can't find very many in depth tutorials, so I am not quite sure what is wrong exactly with the following script, and I desperately want to learn in-depth regex. Any help?
:
$file = 'C:\\Documents and Settings\\*My Name Here*\\Desktop\\Code\\Programming\\PerlfileText.txt'; |
Re: Perl Noob, regex
What are you trying to match, and what is your script showing?
I see a couple issues to note.. :
print '\nA match was found\n';:
print "\nA match was found\n";also, the code $text = <search>; only reads the first line of the file. If you want to look for a match on any line in the file, you have to put that in a loop to check each line. |
| All times are GMT -5. The time now is 12:39 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC