Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: saving rest of array after a match

by thinker (Parson)
on Jun 27, 2003 at 10:25 UTC ( [id://269499]=note: print w/replies, xml ) Need Help??


in reply to saving rest of array after a match

Hi,

If the reason you want the spaces is simply to print the array, perhaps it would help to note that this can be done simply by surrounding the array in the print statement by double quotes. ie
print "@incline";
hope this helps

thinker

Replies are listed 'Best First'.
Re: Re: saving rest of array after a match
by pzbagel (Chaplain) on Jun 27, 2003 at 17:44 UTC

    That works in the assignment operator too:

    use Data::Dumper; @a=(1..10); $b="@a"; print Dumper(\@a,$b); print "Array: @a\n"; print "Scalar: $b\n"; ## OUTPUT ######################## $VAR1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; $VAR2 = '1 2 3 4 5 6 7 8 9 10'; Array: 1 2 3 4 5 6 7 8 9 10 Scalar: 1 2 3 4 5 6 7 8 9 10

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found