unixhome has asked for the wisdom of the Perl Monks concerning the following question:
Thanks in advance, RV# cat email_header.eml | ./parse_me.pl ################## #!/usr/bin/perl # while (<STDIN>) { .......... $header .= $_; .......... # Passing $header as argument to sub &parse_header($header); .......... } sub parse_header { # How do I refer to the argument ($header) # passed to sub? I want the whole contents # of ($header) to be passed. Is it @_ or $_ while (?????????) do this and that } ##################
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with argument to a subroutine
by ikegami (Patriarch) on May 15, 2006 at 18:39 UTC | |
by dsheroh (Monsignor) on May 15, 2006 at 21:37 UTC | |
by ikegami (Patriarch) on May 15, 2006 at 21:45 UTC | |
|
Re: Help with argument to a subroutine
by krisahoch (Deacon) on May 15, 2006 at 18:36 UTC | |
|
Re: Help with argument to a subroutine
by shonorio (Hermit) on May 15, 2006 at 18:43 UTC | |
|
Re: Help with argument to a subroutine
by GrandFather (Saint) on May 15, 2006 at 18:51 UTC | |
|
Re: Help with argument to a subroutine
by Zaxo (Archbishop) on May 15, 2006 at 18:42 UTC | |
|
Re: Help with argument to a subroutine
by TedPride (Priest) on May 15, 2006 at 19:07 UTC | |
by GrandFather (Saint) on May 15, 2006 at 19:11 UTC | |
by unixhome (Novice) on May 15, 2006 at 19:22 UTC |