in reply to Simple parse of file - getting started
#!/usr/bin/perl -w use strict; my ($one,$two); open(H,qq(<homework.txt))or die $!; local($/); my $file=<H>; close(H); if($file=~m/AGF30/g){if($file=~m/\G(?:.*\n?)*%(.*)\n.*\n(.*)/g){$one=$ +1;$two=$2}}; for($one,$two){$_=substr $_ ,length($_)-10,10}; print $one,$two; 1; __DATA__ 0123456789ABCDEFGHIJ <b>Update</b> Aw hell. Should've used \s!
Celebrate Intellectual Diversity
|
|---|