however its use is interesting, because with a special formatting one may get an impression that \ is a binary operator. Here:sub head($) { my ($x, $xs) = split( ' ', ${$_[0]}, 2); ${$_[0]} = $xs; return $x; }
where head \ $msg indeed looks like a binary operation :)my $msg = "new item x"; my $cmd = head \ $msg; if ( $cmd eq 'new') { if ( head \ $msg eq 'item') { ... } } elsif ( $cmd eq 'set') { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: \ as a binary operator
by jwkrahn (Abbot) on Jul 01, 2009 at 17:03 UTC | |
by dk (Chaplain) on Jul 01, 2009 at 23:11 UTC |