Quicksilver has asked for the wisdom of the Perl Monks concerning the following question:
The error message that I was getting says that use of @_ is deprecated in split but is there a cleaner, more efficient way of achieving my desired result? Thanks.#!c:\perl\bin\perl.exe use strict; use warnings; use DBI; my $index; my $additional; #Create the strings first my $db = DBI->connect('dbi:mysql:sequence:localhost', 'db', 'pass'); my $sth = $db->prepare('SELECT * FROM milton'); $sth->execute(); my $indexstring = $sth->fetchrow_array; $sth = $db->prepare('SELECT * FROM milton1'); $sth->execute(); my $additionaltext = $sth->fetchrow_array; print "$indexstring\n"; print "$additionaltext\n"; if ($indexstring eq $additionaltext) { print "lines match"; } else { print "lines do not match"; #$index = split //, $indexstring; #$additional = split //, $additionaltext; } $sth->finish; $db->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing the individual characters in two strings to find their differences
by grizzley (Chaplain) on Apr 03, 2008 at 07:40 UTC | |
by ikegami (Patriarch) on Apr 03, 2008 at 07:51 UTC | |
by grizzley (Chaplain) on Apr 03, 2008 at 07:58 UTC | |
|
Re: Comparing the individual characters in two strings to find their differences
by ikegami (Patriarch) on Apr 03, 2008 at 08:07 UTC | |
by Anonymous Monk on Apr 03, 2008 at 08:45 UTC |