Think about Loose Coupling | |
PerlMonks |
Re^3: $/ questionby convenientstore (Pilgrim) |
on Jan 13, 2008 at 03:40 UTC ( [id://662150]=note: print w/replies, xml ) | Need Help?? |
Below example do not work either.. after putting into paragraph mode why? I get --> sdfsdfsdf23423 #!/usr/bin/perl -w use strict; sub slurpie { while (<DATA>) { local $/ = ""; # put into paragraph mode (separated by one or more blank lines next unless /^\w\w.+(\w\w).+(\d+).+(\w\w)/sg; #should only match first paragraph print "$_\n"; } } slurpie(); __DATA__ hi hi 234 hi hoi sdfsdfsdf23423 hi hi hi 1234 1
In Section
Seekers of Perl Wisdom
|
|