in reply to getting error "Use of uninitialized value $lines in concatenation (.) or string at line 6
Change to single quotes for Linux.perl -ne "$first ||=$_; $last=$_; $count++}{die qq(ERROR found $count +lines. Need >5) unless $count>5; print qq(FIRST:$first\nLAST:$last\n) +" YOUR-FILE-NAME-here.txt
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: getting error "Use of uninitialized value $lines in concatenation (.) or string at line 6
by chiru (Initiate) on Jul 03, 2014 at 05:21 UTC | |
by AppleFritter (Vicar) on Jul 03, 2014 at 09:46 UTC | |
by perlfan (Parson) on Jul 03, 2014 at 11:51 UTC |