Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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;

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?
[robby_dobby]: if I do make it, I can at least savour their local tea! :-)
[LanX]: oh they have sleper cells everywhere
[robby_dobby]: LanX: Not really, the only problems would be from religious divides. Coptics/Moslems/ Kurds/Jews
[erix]: Zzz
[erix]: Coptics? :)
[robby_dobby]: erix: Coptic Christians in Egypt
[choroba]: Robocoptic!
[erix]: I like Coptics :)
[LanX]: Copts
[erix]: sorry - just pulling your leg

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (17)
As of 2017-04-24 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.