in reply to Pattern Matching problem
Please use code tags!
Your problem lies in the line
my $content =~ m/(\/$string\/a-z*)/g;
This tries to match your pattern against the string in $content which is not defined at this point in time. You could try something like:
my @content = $_ =~ m/(\/$string\/a-z*)/g;
which captures all matches into the array @content.
What is also funny about your code is the loop foreach(@daten){. You do not seem to be using the elements of @daten anywhere. Should this not be something like foreach my $daten (@daten){?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pattern Matching problem
by auhakim (Novice) on Jun 04, 2013 at 12:46 UTC | |
by hdb (Monsignor) on Jun 04, 2013 at 12:49 UTC | |
by auhakim (Novice) on Jun 04, 2013 at 12:54 UTC | |
by hdb (Monsignor) on Jun 04, 2013 at 13:16 UTC | |
by auhakim (Novice) on Jun 04, 2013 at 14:42 UTC | |
by marto (Cardinal) on Jun 04, 2013 at 12:59 UTC | |
by auhakim (Novice) on Jun 04, 2013 at 13:08 UTC | |
| |
by hdb (Monsignor) on Jun 04, 2013 at 14:32 UTC |