On Fri, 2006-07-04 at 17:38 +0200, Brent Clark wrote:
> Hi all
> 
> I have a string like so
> 
> 01.01.04
> 
> I need to split and add it to an array
> 
> my method of
> 
> ($abc) = $test =~ /\./g;
> 
> does not seem to provide me with a satisfying result
> 
> and I get back is the period.
> 
> If anyone could assit, it would be most helpful
> 
> Kind Regards
> Brent Clark
> 

See `perldoc -f split`

Try:

#!/usr/bin/perl

use strict;
use warnings;

my @abc = split /\./, '01.01.04';
print "@abc\n";

-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



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


Reply via email to