Paul Johnson wrote:
> On Sat, Apr 03, 2004 at 11:53:59AM -0800, R. Joseph Newton wrote:
>
> > Paul Johnson wrote:
> >
> > > $_ = "Leave me alone!";
> > > $s = "0";
> >
> > Better yet:
> > $lower_or-mixed_case_string = 'o';
>
> I worry that you may have missed the point of the example, which was th
On Sat, Apr 03, 2004 at 11:53:59AM -0800, R. Joseph Newton wrote:
> Paul Johnson wrote:
>
> > $_ = "Leave me alone!";
> > $s = "0";
>
> Better yet:
> $lower_or-mixed_case_string = 'o';
I worry that you may have missed the point of the example, which was the
value of the variable being passed in
Thank you to all the responders! I love getting insights like this,
Yes I will not use that method (see subject), just love lots of points
of view to better my angle :)
Thanks again ;p
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
On Sat, 03 Apr 2004 11:49:02 -0800
"R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> > If one wanted to write a function that used either the given
> > argument or$_ how would you do that?
>
> Don't
>
> > myfunc($myvalue);
> > or
> > myfunc; #uses the current value of $_
> >
> > sub myfunc {
>
Paul Johnson wrote:
>
> $_ = "Leave me alone!";
> $s = "0";
Better yet:
$lower_or-mixed_case_string = 'o';
> to_upper $lower_or-mixed_case_string;
With intelligent use of the editing facilities available, extra characters do
not cost much.
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
"JupiterHost.Net" wrote:
> Hello List,
>
> It just occurred to me that many Perl functions use $_ if not other
> value is supplied. chomp for instance..., which is very handy...
Yes. Like the peaceful feeling that comes the first time one shoots up junk.
> If one wanted to write a function that
On Sat, 3 Apr 2004 11:04:35 -0600
"Charles K. Clarkson" <[EMAIL PROTECTED]> wrote:
> Smoot Carl-Mitchell <[EMAIL PROTECTED]> wrote:
> : > >sub test {
> : > >
> : > > my $arg;
> : > > $arg = shift or $arg = $_;
> : > >}
> : >
> : > Same problem as the last suggestion.
> :
> : And what specifical
Smoot Carl-Mitchell <[EMAIL PROTECTED]> wrote:
:
: On 3 Apr 2004 14:40:43 -
: [EMAIL PROTECTED] (Peter Scott) wrote:
:
: > In article <[EMAIL PROTECTED]>,
: > [EMAIL PROTECTED] (Smoot Carl-Mitchell) writes:
: > >
: > >sub test {
: > >
: > > my $arg;
: > > $arg = shift or $arg = $_;
: > >
On 3 Apr 2004 14:40:43 -
[EMAIL PROTECTED] (Peter Scott) wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Smoot Carl-Mitchell) writes:
> >On Fri, 02 Apr 2004 10:37:14 -0600
> >"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
> >
> >> It just occurred to me that many Perl functions us
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Smoot Carl-Mitchell) writes:
>On Fri, 02 Apr 2004 10:37:14 -0600
>"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
>
>> It just occurred to me that many Perl functions use $_ if not other
>> value is supplied. chomp for instance..., which is very han
On Fri, Apr 02, 2004 at 07:18:25AM -1000, Beau E. Cox wrote:
> sub to_upper
> {
> # point to passed arg or caller's $_
> my $arg = $_[0] ? \$_[0] : \$_;
my $arg = @_ ? \$_[0] : \$_;
> # modify in place
> $$arg = uc $$arg;
> }
$_ = "Leave me alone!";
$s = "0";
to_upper $s;
On Fri, 02 Apr 2004 10:37:14 -0600
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
> It just occurred to me that many Perl functions use $_ if not other
> value is supplied. chomp for instance..., which is very handy...
>
> If one wanted to write a function that used either the given argument
> or
On Friday 02 April 2004 07:04 am, Beau E. Cox wrote:
> On Friday 02 April 2004 06:37 am, JupiterHost.Net wrote:
> > Hello List,
> >
> > It just occurred to me that many Perl functions use $_ if not other
> > value is supplied. chomp for instance..., which is very handy...
> >
> > If one wanted to w
On Friday 02 April 2004 06:37 am, JupiterHost.Net wrote:
> Hello List,
>
> It just occurred to me that many Perl functions use $_ if not other
> value is supplied. chomp for instance..., which is very handy...
>
> If one wanted to write a function that used either the given argument or
> $_ how wou
14 matches
Mail list logo