in reply to split help
Hi AM,
This should do what you want. See perldoc -f split
#!/usr/bin/perl use strict; use warnings FATAL => 'all'; my $str = "DATETIME 09:59:11"; my $time = (split " ", $str)[1]; my ($h,$m,$s) = split ':', $time; print $h;
Hope this helps
thinker
Update Answered the question that was asked, not the one I imagined :-)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: split help
by matthewb (Curate) on Sep 23, 2003 at 15:32 UTC |
In Section
Seekers of Perl Wisdom