>Hi Every one,
>
>
>I have a single cuestion how i do using the funtion split to separate a
>date, example:
>
>$date = 2001/01/16;
>
>I whant do this give to $year = 2001;
> $month = 01;
> $day = 16;
>
>I do somthing like this
>
>($year, $month, $day) = split (/ /, $date);
>
>And in doesnt work.
try this instead.
#!/usr/local/bin/perl
$date = '2001/01/16';
($year,$month,$day)=split(/\//,$date);
print "Year = $year Month = $month Day = $day\n";
Hope that helps.
> Note: sorry for my bad english
>
> Thanks a lot for the help
>
> Ricardo Cumberbatch L.
>
>
>
>
>
>_______________________________________________
>Perl-Unix-Users mailing list. To unsubscribe go to
>http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users