in reply to Regexp for oneliner conversion
How do I convert a Unix oneliner like this
Depends how "like" that it is:
$o = q[perl -wl -e 'print "This is text";'];; $o =~ tr['"]["'];; print $o;; perl -wl -e "print 'This is text';"
I can see many ways to make that fail, but it might be good enough.
Otherwise, you soon move into the realms of Only perl can parse Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexp for oneliner conversion
by cztmonk (Monk) on Aug 05, 2012 at 12:42 UTC | |
by BrowserUk (Patriarch) on Aug 05, 2012 at 12:58 UTC |