more useful options | |
PerlMonks |
Re: PERL $/variableby Animator (Hermit) |
on Mar 11, 2010 at 18:23 UTC ( [id://828110]=note: print w/replies, xml ) | Need Help?? |
You really should enable warnings in your code... Your first example: $/ = m/\d..../;. Your second example: $/ == m/\d.../;. What you want to do is not possible with $/. $/ has to be a string (or a reference to a integer). It can not be a regex. What you could do is set $/ to undef; then read from the file and then use: while ($data =~ m/\d.../g) { ... }
In Section
Seekers of Perl Wisdom
|
|