in reply to
concatenating variables
Primarily to test the efficacy of join, I tried it sans DBI, joining $linename and $counter. I used $i instead of $counter.
#!/usr/bin/perl
use autodie;
use strictures 1;
use Time::HiRes qw/sleep/;
my $linename = 'line';
my $rowsaffected = 0;
my $i = 1;
my $max = 10;
foreach $_ ( 1 .. $max ) {
my $concatline = ( join( '', $linename, $i ) );
++$concatline;
sleep(0.01);
if ( $rowsaffected == 0 ) {
print "Operations were successful but no rows were affected";
}
elsif ($rowsaffected) {
print "Operation was successful ($rowsaffected rows)n";
}
else {
print "Operation failed: $!";
}
}
exit 0;