Perl Programming

CSE3395




Lecture: Subroutines


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



It's hard to make a topic like subroutines interesting.

You have, of course, sigh, the option of sending parameters to a subroutine.

many Unic protrams can act as filters
<> diamond operator. Returns as much input as there is.
If there are no comad line options then it acts like

sub name
{
#body goes here
}

You almost never need to use the & character, only when it's ambiguous. But we're encouraged to use the ampersand and brackets.

@_ is the list that has been passed into me.

Remember the value of pi? It's a good party trick anyway.

returning
Last value evaluated
Can use the return keyword
Return value can be a scalar or list


0 Responses to “Lecture: Subroutines”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 


Previous posts

Archives

Links