in reply to Re^6: Sorting based on any column
in thread Sorting based on any column

$ab = "\$a";

That's taking the value of $a and appending it to a backslash ...

Actually, it's escaping a  $ (dollar) character to make it a literal rather than a scalar sigil, which would result in scalar interpolation:

c:\@Work\Perl\monks>perl -wMstrict -le "my $a = 'foo'; my $ab = qq{'\$a' '$a'}; print $ab; " '$a' 'foo'
(I have to use  qq{} instead of  "" (double-quotes) to keep Windoze command line from going nuts with escapes.)


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
Re^8: Sorting based on any column
by aaron_baugher (Curate) on May 21, 2015 at 21:46 UTC

    Oh, of course. That's what I get for not trying it once to make sure. Thanks for correcting both my mistakes in this thread.

    Aaron B.
    Available for small or large Perl jobs and *nix system administration; see my home node.