Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: functions

  1. #1
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts

    functions

    Hi, I've been scanning around the net trying to find any tuts on creating functions. Can you not creat functions using perl?

    Regards,

    Phil
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,877
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Functions in Perl are called subroutines.

    Start by reading the documentation that comes with perl. In this case, that will be:

    C:\>perldoc perlsub

    or on the net at:
    http://perldoc.perl.org/perlsub.html

    For the documentation index, see:
    C:\>perldoc perl

  • Users who have thanked FishMonger for this post:

    Phil Jackson (01-23-2010)

  • #3
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    Quote Originally Posted by FishMonger View Post
    Functions in Perl are called subroutines.

    Start by reading the documentation that comes with perl. In this case, that will be:

    C:\>perldoc perlsub

    or on the net at:
    http://perldoc.perl.org/perlsub.html

    For the documentation index, see:
    C:\>perldoc perl
    Thanks some good info. You know where i can get info on returning a http header response from a domain? mainly the code and or location if 301?
    Website Design Mansfield
    PHP Code:
    function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
    echo 
    I_LOVE(); 


  •  

    Posting Permissions

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