Is it possible to rewrite this perl subroutine without using variables? sub XMLEncode { my ($line) = @_; $line =~ s/&/&/g; $line =~ s/</</g; $line =~ s/>/>/g; return $line; } I was thinking something like sub XMLEncode { s/&/&/g; s/</</g; s/>/>/g; return $_; } but I can't get it to work like that. -Philip Mak ([EMAIL PROTECTED])
- Re: [OT] How to write this perl sub w/o variables? Philip Mak
- Re: [OT] How to write this perl sub w/o variables? Honza Pazdziora
- Re: [OT] How to write this perl sub w/o variables? Stas Bekman