in reply to and this or that
A side note: As a matter of good form, I don't declare lexically scoped variables within subexpressions, and especially not within conditionally executed ones, like you did with @files. In this specific example, I would not combine the readdir and openddir in one line.opendir(PWD,"$next") && my @files = readdir PWD or die "Open \"$_\" failed: $!";
Your second example I would seperate into two statements as jeroenes suggested above, but you can also do
if you're really itching to put it all on one line. Or, if you prefer:s/test/whatever/, print;
s/test/whatever/ => print;
MeowChow print $/='"',(`$^X\144oc $^X\146aq1`)[-2]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: and this or that
by dws (Chancellor) on Feb 06, 2001 at 01:41 UTC | |
by MeowChow (Vicar) on Feb 06, 2001 at 01:53 UTC | |
by dws (Chancellor) on Feb 06, 2001 at 02:12 UTC |