Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Perl delete function

by hdb (Monsignor)
on Dec 23, 2013 at 07:19 UTC ( [id://1068151]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Perl delete function
in thread Perl delete function

You need to determine the size of the smaller array and restrict the loop accordingly.

my $size = @data1 < @data2 ? @data1 : @data2;

Replies are listed 'Best First'.
Re^6: Perl delete function
by annel (Novice) on Dec 23, 2013 at 07:39 UTC
    Thanks for the tips. It works.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found