Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: merging arrays

by Samy_rio (Vicar)
on Jun 24, 2006 at 03:59 UTC ( [id://557351]=note: print w/replies, xml ) Need Help??


in reply to merging arrays

Hi Anonymous Monk, It works for me as below:

use strict; use warnings; my @found_images = qw( hello i am fine); my $pics_to_find = 2; my @saved_images = qq(@found_images[0..$pics_to_find]); #$,="\n"; #print @saved_images; print $saved_images[0]; __END___ OutPut is : hello i am

Use my @saved_images = @found_images[0..$pics_to_find]; also for crunch the array.

Updated

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Replies are listed 'Best First'.
Re^2: merging arrays
by chromatic (Archbishop) on Jun 24, 2006 at 07:00 UTC

    That doesn't work the way you think it works. Assign to $" to see what's in the array:

    { local $" = ')('; print "(@saved_images)\n"; }

    You really don't need the qq() in there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-18 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found