Return 2 references to arrays instead:
sub givestats
{
...
return ([EMAIL PROTECTED],[EMAIL PROTECTED]);
}

...
my ( $nare, $baja)=givestats($xp);
use @$nare to dereference into the array.


Naresh Bajaj wrote:
Hello ,
I am pretty new to perl. I was wondering how can I get two array return to my subroutine call.
my ( @nare, @baja)=givestats($xp);
It is giving me only one combined array of two variables. How should I solve this problem.
I want to arrays without any mix up.
Thanks,
Naresh
sub givestats {
    my $xp=$_[0];
    my @episodenum=();
    my $count=1;#Flashback data is in $COR[1]
    my @posreject=();
    my @posaccept=();
    my @flashaccept=();
    my @eventtype=();
    my @flashbacknum=();
   #some code here******
    return (@posaccept,@flashaccept);
}

On 3/9/06, *Lynn. Rickards* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Lynn. Rickards wrote:
    > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
    wrote:
    >
    >> Jan et al-
    >>
    >> Jan, I have this to you as well as the list because I have noticed
    >> your name on a LARGE number of sites talking about WIN32::OLE
    and the
    >> packages within it.
    >>
    >> I keep getting errors saying that no matter WHAT i have, range
    (xy) or
    >> Cells (y,x) that Range and Cells errors out as not being a
    function.
    >>
    >> Could you explain to me what is wrong with my headers and or
    script? I
    >> need to gather information on a large number of systems on a weekly
    >> basis and populate an Excel spread sheet and this would help
    GREATLY
    >> if i could get it working. when I made something quick and
    dirty using
    >> perl to create a CSV that was able to give me what i needed to
    tweak
    >> the sorting and pulling information out, so if you need to get
    >> something else to show me the errors and explain that is ok.
    >>
    >> let me know if you would like me to find a host to link psinfo
    onto. I
    >> believe it is freeware
    >>
    >> Thank you in advance,
    >>
    >> -Josh
    >>
    >> -----code follows-----
    >
    >
    > < code snipped >
    > As-is (after correcting mail formatting) the script itself
    > generates a bunch of non-OLE errors. It would make it easier
    > to assist if you were able to offer a minimal test-case without
    > dependencies on a particular executable or network environment
    > that reproduces the error...
    >
    > Also, exactly *what* is the OLE error you get...? Even that might
    > help pinpoint.
    >
    >  - Lynn.

    OK, what I hope is the core error is syntactical - and the error
    you mentioned makes sense -

    Throughout, when you are setting Value, you are using parens...
    $ws -> Range("A1") -> ('Value') = "Node";
    ...instead of curlies
    $ws->Range("A1")->{Value} = "Node";

    BTW the ' single quotes you use throughout to surround class members
    are not necessary, though they apparently do no harm.

    That done, I put Psinfo in place but running on localhost, and the
    while loop...
    while (!($examine[0] =~ m/OS Hot Fix.*/i)){

    ...just seems to run forever until I guess Excel runs out of patience
    and craps out. Some error-checking might be in order in the loop.

    HTH - Lynn.
    _______________________________________________
    ActivePerl mailing list
    [email protected]
    <mailto:[email protected]>
    To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




--
Naresh Bajaj, Intern,
Cardiac Rhythm Disease Management,
Medtronic Inc.,
763-514-3799

------------------------------------------------------------------------

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to