Fouled Script
Steve Smythe
ssmythe at docent.com
Mon Jan 7 08:57:12 CST 2002
Semi-colons are needed after the variable assignments and your open
statement.
Also, you should use:
$MDIR = "directoryname";
And not an array definition as you have below.
I'm not on any unix machines at the moment, but eyeballing it, that looks
like
pretty much it.
Steve
-----Original Message-----
From: owner-colorado-springs-pm-list at pm.org
[mailto:owner-colorado-springs-pm-list at pm.org]On Behalf Of Harry Schroeder
Sent: Monday, January 07, 2002 6:59 AM
To: deedsmis at aculink.net; pikes-peak-pm-list at happyfunball.pm.org
Cc: Keary Suska
Subject: Re: Fouled Script
Check for missing semi colons.
Has3
SoloCDM wrote:
The attached script is my first attempt at some means of perl
scripting, base on your advice. It won't work. I keep getting the
following error:
syntax error at ./find-perl-sample2 line 8, near "open "
Execution of ./find-perl-sample2 aborted due to compilation errors.
_____
#!/usr/bin/perl -w
#
$MDIR = [directory]
$MFILES = "find $MDIR -type f -ls -xdev -fstype ext2 \( -iname '*personal*'
-o -iname '.*personal*' \) -print"
open FIND, "$MFILES |" or die $!
while( <FIND> ) {
print "$_\n";
}
close FIND;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/pikes-peak-pm/attachments/20020107/05d29409/attachment.htm
More information about the Pikes-peak-pm
mailing list