Closed Thread
Results 1 to 5 of 5

Thread: adding sub routines to perl

  1. #1
    if i want to add a sub routine how do i do that

  2. #2
    FWS Addict atlas has a spectacular aura aboutatlas has a spectacular aura about atlas's Avatar
    Join Date
    Nov 2000
    Posts
    501
    Code:
    sub subroutineName
    {
    	my($argument_a, $argument_b) = @_;
    
    	# where $argument_a & b are just things you pass
    	# the subroutine like &subrotineName("stuff","joe");
    
    }
    mjk@atlascgi.com

  3. #3
    cool
    now if i add that in how do i call upon it where i need it in my script?

  4. #4
    FWS Addict atlas has a spectacular aura aboutatlas has a spectacular aura about atlas's Avatar
    Join Date
    Nov 2000
    Posts
    501
    I use

    Code:
    &subroutineName("arg1","arg2");
    but
    subroutineName("arg1","arg2");
    will work too
    mjk@atlascgi.com

  5. #5
    cool i got it to work how i wanted thanx

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts