Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I find I use -a rather alot for snippets like the following:

    dpkg -l | perl -lane 'print $F[1] if $F[1] =~ /ruby/'

    It's still useful for alternative delimiters. Pretending dpkg used tabs for delimiters, I'd add the parameter


    It also find it's really helpful to got a proper handle on quoting whether in my shell or in perl. Often in a one-liner I'm using qq{} in perl to avoid messing with my shell's own use of ' or ". Occasionally I use bash's $'\t' syntax which lets me say things like

    perl -F$'\t'

    . I often say the ugly but effective:

    perl -le 'print "Cant'\''t get no satisfaction"'

    I use the very, very short one-liner

    perl -dea

    which just opens up a fresh debugger. I like that "dea" is supposedly the Latin word for goddess. I gather other people like to have other cute words like -debugger. It's all rather arbitrary but works as long as the word starts with the letters 'de'.