Hi all,
I´m new here and my English is not the best. However, I would like to get some
help for my perl-problems.
I want to write a script which is finding data´s like "0.1" or "46.7" in a
string and declare them as variables, which are to be changed and wrote back.
The string is looking like: "test [0.4\9.0]"
My intention was to get data out of the []-brackets and set them to variables
which can be changed.
the script (partially) I thought Ihave to use for this:
while (<$in> )
{
if ($in =~ /(-?\d+\.\d)\(-?\d+\.\d)/)
{
$leaf1 = $1;
$leaf2 = $2;
print "$leaf1\n";
}
}
isn´t working. There is nothing printed out were I expected to see "0.4".
Can someone tell me, where is the fault, please? And for the case, there are 80
data´s in the line, is there a shorter style to find & change them?
Thanks for your help
regards Claudia
___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/