Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: What one-liners do people actually use?

by SamCG (Hermit)
on Dec 13, 2005 at 15:01 UTC ( #516321=note: print w/replies, xml ) Need Help??

in reply to What one-liners do people actually use?

Note: on Windows. . . I don't use dbm's extensively, but it does come up. . .
perl -e "use SDBM_File;use Fcntl;tie %h, 'SDBM_File', 'H:\dbm\mydbmfil +e', O_RDWR, 0600;for (sort keys %h){print \"$_=$h{$_}\n\";}"
H:\>perl -e "use SDBM_File;use Fcntl;tie %h, 'SDBM_File', 'H:\dbm\mydb +mfile', O_RDWR, 0600;map {print \"$_=$h{$_}\n\";} sort keys %h;"
I may eventually put one of these into a script, I guess, but it's kind of short. I use a similar sort of technique for some other small manipulations (such as when I want to change the value of one key or something).

They're also the first one liners I've really used besides ultra-simple ones like perl -v.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://516321]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-07-23 23:39 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (347 votes). Check out past polls.