in reply to !~ /\w/ challenge, anyone?
perl -lpe "}{${'~'^'!'}=$." file
Note: I get a problem running this under bash, because it interprets the ! incorrectly. But stick it in a file and it will run correctly. e.g.,
Update: fixed a typo, and I forgot to put file on the command line. And here's a new version that actually runs on the command line:#!/usr/bin/perl -lp }{${'~'^'!'}=$.
perl -lpe '}{${"#"^"|"}=$.' file
-- Mike
--
just,my${.02}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: !~ /\w/ challenge, anyone?
by John M. Dlugosz (Monsignor) on Feb 05, 2003 at 20:32 UTC |