in reply to Re: obtaining the three leftmost characters of a string
in thread obtaining the three leftmost characters of a string
Fat arrow should be used only when the quoting powers are wanted, and possibly to set up hash key/value pairs, paying special care to in-scope "use constants".@things = split /,/ => $input; # works use constant DELIMITER => ','; @things = split DELIMITER => $input; # BREAKS (treats DELIMITER as a q +uoted word) @things = split DELIMITER, $input; # works
-- Randal L. Schwartz, Perl hacker
|
|---|