Niall wrote:
> #!/usr/bin/perl
> #
> use DBI;
> use strict "vars";
> my ($Filename, $title, $dbh);
> $dbh = DBI->connect("DBI:mysql:Photocall", "web", "web");
> $Filename = "1 Anything at all /WHATEVER";
> $Filename =~ m-(\d+ +)(.*)(/WHATEVER)-;
> print "backreference 2 is $2\n"; # remove this line to see problem
> $title = $dbh->quote($2);
> print "Title is $title\n";
> # replace with code from block below
> $dbh->disconnect;
> exit(0);
I just tried this piece of perl, and it works fine for me (ie the output
does what you expect it to do).
I'm running Perl v5.005_03 as supplied with Slackware 7.0 with the
modules installed. What are you running?
T.
--
Thomas Bridge 26 Upper Fitzwilliam St.,
Senior Hostmaster/Sysadmin, Dublin 2,
VIA NET.WORKS Ireland. Ph: +353 1 6763600
thomas.bridge at via-net-works.ie Fax: +353 1 6627674
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!