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

Re^2: to pick the common element in the array

by Anonymous Monk
on Feb 20, 2014 at 18:51 UTC ( [id://1075625]=note: print w/replies, xml ) Need Help??


in reply to Re: to pick the common element in the array
in thread to pick the common element in the array

does thie code work for common elements when the following two arrays are used? my @array1=('a','2','3','2'); my @array2=('1','2','3');
  • Comment on Re^2: to pick the common element in the array

Replies are listed 'Best First'.
Re^3: to pick the common element in the array
by zentara (Cardinal) on Feb 21, 2014 at 11:37 UTC
    What happens when you try?

    Perl is good about doing what you mean. Usually, languages will separate ascii data from numerical data, it's called "context". The code I showed treated alphanumeric strings and numbers exactly the same. So it should work.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2026-01-21 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.