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 :-)In reply to Re: split help
by thinker
in thread split help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |