in reply to Re^5: functions and arguments
in thread functions and arguments

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^7: functions and arguments
by andreas1234567 (Vicar) on Feb 21, 2008 at 07:44 UTC
    mercuryshipz:

    I was just trying to point out that the line below does not do what you expect:

    my $result = &search_phrase('@newarray');
    I suspect you will get it working if you remove the quotes around the array variable:
    my $result = &search_phrase(@newarray);
    Read up on quotes and interpolation in perlop. Then consider learning about context, e.g. read this article.
    --
    Andreas

      i tried tat... but still no luck.... this kinda wierd, cuz i tried to print the array.... its nothing in there (it printed 0, but when i ran it seperately... it gives me the desired result...

      thanks andreas1234567.