Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: concatenating variables

by Khen1950fx (Canon)
on Jul 31, 2012 at 21:18 UTC ( #984661=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: concatenating variables
Select or Download Code
Re^2: concatenating variables
by Anonymous Monk on Aug 01, 2012 at 01:25 UTC

    Primarily to test the efficacy of join ..

    Stop trolling !

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-07-28 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (210 votes), past polls