in reply to Re^2: $/ question
in thread $/ question
#!/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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: $/ question
by kyle (Abbot) on Jan 13, 2008 at 03:47 UTC | |
by convenientstore (Pilgrim) on Jan 13, 2008 at 03:55 UTC | |
by kyle (Abbot) on Jan 13, 2008 at 04:13 UTC | |
by convenientstore (Pilgrim) on Jan 13, 2008 at 04:22 UTC |