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

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

Replies are listed 'Best First'.
Re^8: functions and arguments
by mercuryshipz (Acolyte) on Feb 21, 2008 at 16:35 UTC

    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.