Re: Check if a given function returns something



On Thu, Feb 28, 2008 at 4:28 PM, MK <halfcountplus@xxxxxxxxxxxxx> wrote:

# do not "use strict"

Why not?

The purpose of
return is to exit the subroutine at some arbitrary point and the return
value is limited (usually to indicate "success" or "failure").

What does "the return value is limited" mean? Can you give a concrete
example of what you're talking about?

--Tom Phoenix
Stonehenge Perl Training
.



Relevant Pages

  • Re: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF
    ... data position in your file, when you call your subroutine the second ... --Tom Phoenix ... Stonehenge Perl Training ...
    (perl.beginners)
  • Re: string
    ... and put the parts of the returned value into a string. ... In this case - a dos .com file, ... so after having printed VendorStr twice, you exit normally - without ... call subroutine ...
    (alt.lang.asm)
  • Re: Adding pre/post escape sequences to a "SAY"
    ... $SAY = "WRITE SYS$OUTPUT" exists on pretty much every VMS system, ... The one thing I could think of is to define a subroutine: ... Unofficial OpenVMS Hobbyist Support Page: ...
    (comp.os.vms)
  • Re: die unless match is successful
    ... I want the below if loop to end if it cannot find any match & print the ... However it just exit without hitting my "die" ... chomp $line; ... You shouldn't use an ampersand when you call a subroutine: ...
    (perl.beginners)
  • Re: Inappropriate ioctl for device
    ... I understand that die() exits the program. ... assignment to a variable to hold that exit error, ... What does `shift` do? ... scalars that was passed to the subroutine. ...
    (perl.beginners)