Kiko has asked for the wisdom of the Perl Monks concerning the following question:
So if the first letter in the title is "A", then i will print out all the records where that's true. Right now i'm not getting anything. I don't think that i'm doing the match correctly. Someone Please Help. Thanxs - Kiko################# # PRINT RESULTS # ################# while ($db->FetchRow()) { if(($row>=$min)&&($row<$max)) { my (%dbrow) = $db->DataHash(); # Change the color of the row my $bgcolor="#E6E6D7"; if ($color % 2 !=0) { $bgcolor = "#DDDDDD"; } my $title="$dbrow{'Title'}"; if ($title =~ /^$layer/) { do something... } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching the first letter in a string
by myocom (Deacon) on Jul 31, 2001 at 02:49 UTC | |
by tomhukins (Curate) on Jan 07, 2002 at 21:48 UTC |