[Israel.pm] Perl signature - TTW (time to weekend)

Gaal Yahas gaal at forum2.org
Wed Mar 17 09:44:22 PST 2004


On Wed, Mar 17, 2004 at 06:29:23PM +0000, Srikanth Madani wrote:
> This works fine in the script, but on the command line it fails and gives me
> the message:
> 
> > perl -we '$_="87 69S69E75C69S78
> 68A32W73A83Y32!";($p,$i,$n,$k,$f,$l,$o,$y,$d,$s)=(localtime,join'',map(chr,s
> plit/\D/));$o>4?print$s,HERE:print$s,435660-86400*$o-3600*$n-60*$i-$p,join''
> ,split/\d+/'
> Not enough arguments for join at -e line 1, near "join,"
> Not enough arguments for join at -e line 1, near "join,"
> Execution of -e aborted due to compilation errors.
> 
> What am I doing wrong here?

You're not protecting the two ''s (arguments to join) from the shell,
so join sees an empty first argument.

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list