and generating html. $1 (below) sometimes gets trailing spaces, so I thought to strip'em off:some text ()\xA1 file.txt
But I'm getting error: "Use of uninitialized value in concatenation (.) or string at F:\downloads\lib.pl line 23, <IN> line 4." If I comment (3) everything works fine (except trailing spaces of course). It looks that $2 is somehow invalidated in line 3. TIA(1)if ($line =~ /(.+)\s*\(\)\xA1\s*(.+\.txt)/) { (2) $file = $1; (3) $file =~ s/\s*$//; (4) print OUT "<a href=\"$2\">$file</a><br>\n" }
In reply to RegExp help by karmas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |