Solved

how do i retrieve values from a perl user defined function?

Posted on 2006-10-30
1
231 Views
Last Modified: 2010-04-16
hi experts. for example, a function that i would manually create test(@array,$sum);
how would I in the script retireve to value of the sum variable? i know that @_ gives me everything but I would like to shove the $sum value in a variable in the function body. I hope i make sense. thanks.
0
Comment
Question by:micromarch
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 17839062
sub test{
   my $sum = pop;
   my @array = @_;
}
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
create an incrementing variable name AutoHotKey 5 98
python sqlite question 11 46
creating threads in delphi 1 104
Programatically extract date from website 8 77
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question