Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Augmented pipe delimited output

by Loops (Curate)
on Nov 03, 2014 at 04:04 UTC ( #1105865=note: print w/replies, xml ) Need Help??


in reply to Augmented pipe delimited output

Hi MrTEE

You're masking the values of $f5 and $f7 by declaring them with "my" a second time. You also need to delay the creation of your $xout string until after all your variables are properly set. Try something like:

my ($f1, $f2, $f3, $f4, $f5, $f6, $f7) = ("") x 7; #$f3="C"; if ( not defined $f3 or $f3 eq '' ) { $f5 = "N"; $f7 = "G"; print "the 7th and 8th blocks should have values \n"; } my $xout = "system|$f2|$f3|$f4|$f5|$f6|$f7|\n"; print $xout;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-05-16 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?