Re: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-08-08 Thread Nuno Pereira
Knowing not too much from perl, I would like to remember the last paragraph of Jeremiah: Keep in mind that interpolation is work, so using one of the single quotes strings which does not search your string for variables to replace is going to be higher performance than the double quoted

RE: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-08-08 Thread John Trammell
Funny you should bring up this subject, as it was recently rehashed (more like re-re-re-re-hashed!) on perlmonks.org in this discussion thread: http://perlmonks.org/?node_id=481652 The conclusion of the discussion(s) is that there are valid reasons to use single and double quotes in various

Re: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-07-25 Thread Jeremiah Gowdy
When you use double quotes for strings in Perl, Perl looks through your strings for variables like $foo, and replaces them with the current value of $foo. This is called interpolation. When you use single quotes, it considers your string a literal. So when you use double quotes, you need to

RE: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-07-25 Thread John Trammell
From 'perldoc perldata': Variable substitution inside strings is limited to scalar variables, arrays, and array or hash slices. (In other words, names beginning with $ or @, followed by an optional bracketed expression as a subscript.) You can check this from the command line: % perl

Re: How to use Like Clause in Perl? Works fine in MySQL control center!

2005-07-22 Thread Frank Bax
At 07:03 PM 7/22/05, Siegfried Heintze wrote: I'm having trouble getting the like clause to work. It seems to work fine in the MySQL Control Center 9.4.beta. I'm using MySQL 4.0.23-debug. use DBH; my $sth = DBH-prepare(SELECT 'David!' LIKE '%D%v%'); $sth-execute(); my $row; print