[ILUG] Perl / MySQL oddity
Thomas Bridge
thomas.bridge at via-net-works.ie
Tue Apr 25 11:18:43 IST 2000
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
More information about the ILUG
mailing list