News

I'm working on a basic perl script that needs to print (to a file) a variable all on one line. The variable is initially read in from a file where it may contain one or mare carriage returns or ...
I call my script, derived from many Perl command examples that I’ve encountered on the web, “listen”. Listen will open any (non-busy) port above 1023 for a normal user and any (non-busy ...
perl -p -i -e '$_ = "$. $_"' myfile This one takes a bit of explanation. The $. variable contains the line number, so the command reads “change the line to the line preceded by the line number”.