<html>
<body>
<br>
Hi All<br><br>
First query of the year!<br><br>
If I have a function (sub routine) like :<br><br>
<tt>sub double {<br>
my $num = shift;<br>
return $num * 2;<br>
}<br><br>
</tt>I could say:<br><br>
<tt>$value = 3;<br>
$value = double($value);<br>
print &quot;$value\n&quot;;&nbsp; #&nbsp;&nbsp; 6 expected<br><br>
</tt>My question is how could I write that function so that it works
directly on the variable that is passed to it in the same way that
functions like chomp do?<br><br>
<tt>$value = 3;<br>
double($value);<br>
print &quot;$value\n&quot;;&nbsp; #&nbsp;&nbsp; 6 expected<br><br>
<br><br>
<br>
<x-sigsep><p></x-sigsep>
<font face="Courier New, Courier" size=2>Spike Hodge<br><br>
</font></tt><font face="Courier New, Courier">UNIX Programmer<br>
M-Web Technology<br>
021 596 8496<br>
083 294 9593<br>
Fax 0866721733<br><br>
<br>
</font>Click here and make M-Web your homepage<br>
<a href="http://homepage.mweb.co.za/" eudora="autourl">http://homepage.mweb.co.za</a>
</body>
</html>