in reply to Re^2: how to change this code into perl
in thread how to change this code into perl

You're right. I tried to type a pattern I've used before, directly into the browser without having had my morning coffee. It should be:

perl -anle"@L = @F, next if $. == 1; print if $L[0] eq $F[0]; @L = @F; +" in.txt > out.txt

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re^4: how to change this code into perl
by perlnewbie012215 (Novice) on Aug 30, 2015 at 16:40 UTC

    thank you BrowserUK, I am getting this error.

    syntax error at -e line 2, at EOF Execution of -e aborted due to compilation errors.

    I am pretty new to perl, what does the error mean. I googled but its not very clear