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;

Replies are listed 'Best First'.
Re^2: concatenating variables
by Anonymous Monk on Aug 01, 2012 at 01:25 UTC

    Primarily to test the efficacy of join ..

    Stop trolling !