perl subroutine (SEC: UNCLASSIFIED)
Martijn van Oosterhout
kleptog at svana.org
Wed Sep 25 18:44:28 EST 2002
On Wed, Sep 25, 2002 at 04:56:44PM +1000, Lisman, FLGOFF Jarrad wrote:
<snip>
As Sam said, you need you say $line = substr( ... ) to actually make changes.
> sub subroutine
> {
> substr
> substr
> return($_)
> }
Similarly you need to say something like $_ = shift or $line = shift to get
the argument passed to the function. A few prints should have pointed out
that $line was never changing.
Do you have any books on perl? There are several good ones...
--
Martijn van Oosterhout <kleptog at svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
More information about the linux
mailing list