agarrubio has asked for the wisdom of the Perl Monks concerning the following question:
# in main use strict; use reader; $/= "\n\n\n"; while(<>){ my ($filename)=/^(\S+)/; my $text=reader::firstline($filename); } ### # in file "reader.pm" package reader; sub firstline{ open(my $fh,"<", $_[0]); return <$fh>; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scope of $/
by NetWallah (Canon) on May 26, 2016 at 01:12 UTC | |
by BillKSmith (Monsignor) on May 26, 2016 at 13:29 UTC | |
by NetWallah (Canon) on May 26, 2016 at 13:48 UTC | |
by Anonymous Monk on May 26, 2016 at 01:23 UTC | |
by Marshall (Canon) on May 26, 2016 at 01:38 UTC | |
by Anonymous Monk on May 26, 2016 at 01:52 UTC | |
by Marshall (Canon) on May 26, 2016 at 01:55 UTC | |
| |
|
Re: Scope of $/
by Anonymous Monk on May 26, 2016 at 00:46 UTC | |
|
Re: Scope of $/
by agarrubio (Novice) on May 26, 2016 at 23:39 UTC |