Solved

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

Posted on 2006-10-30
1
232 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 116
detecting  the added row index in a datagridview 3 80
Base1 Encode/Decode 3 82
ejb stateless example 2 24
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
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…

860 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