Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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
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 !

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 making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-07-30 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls