Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: position of first matching regexby GrandFather (Saint) |
on May 18, 2014 at 10:34 UTC ( [id://1086497]=note: print w/replies, xml ) | Need Help?? |
Why print if the match fails? Note that my code includes strictures (use strict; use warnings;). That will warn you of such unhealthy coding practises. I strongly recommend you use strictures, especially if you are just starting out with Perl. The () around your two assignment statements don't add any value and make understanding the intent of your code harder. @array is not a scalar reference. It is the array.
Perl is the programming world's equivalent of English
In Section
Seekers of Perl Wisdom
|
|