Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: remember perl one-liners

by l3v3l (Monk)
on Dec 14, 2005 at 21:54 UTC ( #516779=note: print w/ replies, xml ) Need Help??


in reply to Re^2: remember perl one-liners
in thread remember perl one-liners

Ahh ... makes sense - thought that would help : I tried the echo experiment with cmdhist set and it put echo into history file as one (multi-line) entry - now reading it back in ... is a whole other beast ... this does not do exactly what you require but it does allow multi-line liners to be read back in as one line: after the first $hist substitution in addhist.pl :

$hist =~ s/\s+/ /gm;
so I can now add (from history output):
... 601 perl -MYAPE::Regex::Explain -e 'print YAPE::Regex::Explain->new(qr/(aaaaa(?:(?:(?!aaaaa).)*))/s)->ex +plain' 602 addhist
as:
perl -MYAPE::Regex::Explain -e 'print YAPE::Regex::Explain->new(qr/(aa +aaa(?:(?:(?!aaaaa).)*))/s)->explain'
to my ~/.oneliners file = thank you again for posting this script - I am a big fan of oneliners and this script is a big help in keeping them around longer than my histsize ...


Comment on Re^3: remember perl one-liners
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://516779]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-07-04 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls