in reply to Fetching unique info
The code you show does not do what you think it does. It's declaring a new variable, $number, and then matching the regex against it. Obviously, the regex won't match against an empty string.
I think this code does what you meant to do:
my $got = q!<A HREF="JavaScript:AFunction('AA', 'B','0','Project','113 +')">San Francisco (Manager)!; $got =~ /'(\d{3})'\)">San Francisco \(Manager\)/; my $number = $1; print $number;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Fetching unique info
by Anonymous Monk on Jun 05, 2003 at 14:34 UTC | |
by cbro (Pilgrim) on Jun 05, 2003 at 14:50 UTC |