![]() |
|
XP is just a number | |
PerlMonks |
Return the contents of a fileby jamescohen (Initiate) |
on Feb 04, 2000 at 23:02 UTC ( #2871=snippet: print w/replies, xml ) | Need Help?? |
sub readfile { my $OP ; open FS, $_[0] ; while (<FS>) {$OP .= $_} close FS ; return $OP ; } Returns the contents of a file in list form (line by line) sub readlines { open FS, $_[0] ; my (@OP) = <FS> ; close FS ; return (@OP) ; }
|
|