Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^6: Split array and join with results

by perlnoobster (Sexton)
on Aug 24, 2012 at 07:53 UTC ( [id://989446]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Split array and join with results
in thread Split array and join with results

Hi Bill, Thank you so much for helping me, I really appreciate it! I've added the chomp function however i get the following error in secureCRT Modification of a read-only value attempted?? I think i've done it correctly:
foreach my $colr (@COLOURS) { chomp $colr; print OUT "\n$phn $colr $title\n"; }
How can i fix this? where do i place the chomp function? Thank you :)

Replies are listed 'Best First'.
Re^7: Split array and join with results
by BillKSmith (Monsignor) on Aug 24, 2012 at 17:56 UTC

    I expected that to work. I forgot that $colr is really an alias for an element of @COLOURS. I cannot think of a perfect fix. For now, remove Readonly from @COLOURS (remember to change the fat comma to an equal.)

    <c> my @COLOURS = <DATA>; <c>
    Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-23 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found