Karger78 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl open FILE, $ARGV[0] or die "Can't open $ARGV[0] for reading: $!\n"; @file = <FILE>; close FILE; @Loglines = split(/\n/,$file); foreach (@Loglines){ print "Line: $_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split on new line
by gone2015 (Deacon) on Feb 21, 2009 at 16:24 UTC | |
|
Re: Split on new line
by toolic (Bishop) on Feb 21, 2009 at 16:27 UTC | |
|
Re: Split on new line
by McDarren (Abbot) on Feb 22, 2009 at 08:16 UTC |