Jo for Groups and Lists wrote:
Can you use Date::Manip ?

$fullMonth = &returnFullmonth($month);

sub returnFullmonth {   
        use Date::Manip;
        return UnixDate("2007/$_/01",'%B');
}

This will handle feb, 02, or 2

No, it won't handle anything.

C:\home>type test.pl
use warnings;
$TZ = 'GMT';

$fullMonth = &returnFullmonth('02');

sub returnFullmonth {
        use Date::Manip;
        return UnixDate("2007/$_/01",'%B');
}

C:\home>test.pl
Name "main::fullMonth" used only once: possible typo at C:\home\test.pl line 4. Use of uninitialized value in concatenation (.) or string at C:\home\test.pl line 8.

C:\home>

Arguments passed to a Perl sub are accessed via @_, not via $_. ;-)

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to