parse question
- From: Pradeep <bubunia2000ster@xxxxxxxxx>
- Date: Mon, 14 May 2012 12:10:44 -0700 (PDT)
Hi,
I am a new bie in perl. I have a string as follows
xxxx:yyyy:zzzz:aaaa::bbbb.9.5
I need to discard the 9.5 and my resultant string should be
xxxx:yyyy:zzzz:aaaa::bbbb with .9.5 not be present.
I tried to use split as follows. But its not working as expected. I
will appreciate any help.
use Data::Dumper;
my @str="xxxx:yyyy:zzzz:aaaa::bbbb.9.5";
my @values;
foreach my $val (@str) {
@values = split('.', $val);
}
.
- Follow-Ups:
- Re: parse question
- From: Jim Gibson
- Re: parse question
- Prev by Date: Re: btree
- Next by Date: Re: hash
- Previous by thread: What does "__PACKAGE__->_factory" actually do?
- Next by thread: Re: parse question
- Index(es):