Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to store the first three outputs into variables , something like :Tue Nov 10 15:24:50 SAUST 2009
I am having hard time getting this right ,, here what I have been trying :the day will be Tue the month will be Nov the day num will be 10
I get nothing printed , here is what it looks like :my $todayDate = system qq(date); ($day, $month, $dayNum, $var4, $var5) = split(" ", $todayDate); print "the day will be $day\n"; print "the month will be $month\n"; print "the day num will be $dayNum\n";
Any advice plzthe day will be the month will be the day num will be
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: storing date into variable
by Corion (Patriarch) on Nov 10, 2009 at 12:37 UTC | |
by ack (Deacon) on Nov 11, 2009 at 16:09 UTC | |
Re: storing date into variable
by moritz (Cardinal) on Nov 10, 2009 at 12:39 UTC | |
by ack (Deacon) on Nov 11, 2009 at 16:14 UTC | |
by moritz (Cardinal) on Nov 11, 2009 at 16:42 UTC | |
Re: storing date into variable
by JavaFan (Canon) on Nov 10, 2009 at 13:03 UTC | |
Re: storing date into variable
by skangas (Novice) on Nov 10, 2009 at 13:55 UTC | |
Re: storing date into variable
by biohisham (Priest) on Nov 10, 2009 at 14:45 UTC | |
Re: storing date into variable
by kyle (Abbot) on Nov 11, 2009 at 04:40 UTC |