> <code>
....
> for(@text) {
> /(d+)$/; # Match only the numbers at the end of the string
^^
this should actually be (\d+)
I would actually conditionally print also, like so:
print $1 if /(\d+)$/;
And depending on the size of the file, instead of reading the whole
thing into memory with
my @text = (<FILE>);
I would do:
while(<FILE>) {
print $1 if /(\d+)$/;
}
> # and store them in '$1' to be printed out on the
> # next line followed by a new line character
....
> > @text # contains values of a phone directory
> > $text[0] contains john=012345678
> >
> > $phone1 = ?
> >
> > let say i wanted to grab just the values'012345678'.
> > how should i go on truncating the values?
Cheers,
-dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]