LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Perl / MySQL oddity

[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
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell