carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS) (01/23/91)
Greetings, First off I am an extremely novice perl user, ie I just compiled the source, so my apologies if I am making an obvious mistake. A file I have, has been run through cat -v and to undo this I have been given the following perl commandline :- perl -pe 's/\^(.)/sprintf("%c",ord($1) &~ 0x40)/ge' However when I type in the following :- perl -pe 's/\^(.)/sprintf("%c",ord($1) &~ 0x40)/ge' < thefile I get :- syntax error in file /tmp/perl-ea06498 at line 2, next token "}" Execution aborted due to compilation errors. Any help, RTFM's etc greatfully received. Cheers, Carl.
allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (01/23/91)
As quoted from <4569@male.EBay.Sun.COM> by carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS): +--------------- | perl -pe 's/\^(.)/sprintf("%c",ord($1) &~ 0x40)/ge' < thefile | | I get :- | syntax error in file /tmp/perl-ea06498 at line 2, next token "}" | Execution aborted due to compilation errors. +--------------- Do you have the latest patchlevel of Perl? This looks like an earlier patch level, which did in fact get this wrong if you left off the trailing semicolon. If it works when you put a ";" after the "/ge", this is the problem; get the patches to bring your Perl up to patchlevel 44. ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY