Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Diff'ing dates

by shmem (Chancellor)
on Oct 02, 2007 at 14:47 UTC ( [id://642121]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Diff'ing dates
in thread Diff'ing dates (solved)

Use single quotes on UNIX-like operating systems:
echo -e "Sun 09 30 06 42 36 2007\nTue 10 02 06 01 55 2007\n" | \ perl -MTime::Local -lane 'END{print$t}$F[1]--;$t+=($.*2-3)*timelocal@F +[5,4,3,2,1,6]'

Double quotes cause your shell to interpret e.g. $t as a shell variable.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://642121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2025-05-14 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.