hesco has asked for the wisdom of the Perl Monks concerning the following question:
-- Hugh
This produced output looking like this:#!/usr/bin/perl -w use strict; use warnings; my ($s,$m,$h,$dy,$mo,$yr,$t1,$t2,$t3) = localtime; $mo++; $yr += 1900; foreach my $element ($s,$m,$h,$dy,$mo){ $element = '0' . $element if(length($element) < 2); print $element, "\n"; } print <<EndOfString; $yr-$mo-$dy $h:$m EndOfString
49 54 14 26 05 2009-05-26 14:54
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Does a foreach create a scalar reference?
by DStaal (Chaplain) on May 26, 2009 at 19:19 UTC | |
|
Re: Does a foreach create a scalar reference?
by jwkrahn (Abbot) on May 26, 2009 at 19:29 UTC | |
by Fletch (Bishop) on May 26, 2009 at 19:38 UTC | |
|
Re: Does a foreach create a scalar reference?
by shmem (Chancellor) on May 26, 2009 at 19:57 UTC |