How can I make Perl echo each line of code before executing it? I
don't want to hit return after each code line is printed: I just want
Perl to print it as it's executing code normally.
I would appreciate some help with this. I am learning
Perl. I have a string inputed by the user. This string
is then split, every first letter of each word in the
string is uppercased, then joined back together and
printed.
Here is my code, can anyone help? Thanks, Sara G.
!/usr/bin/perl
You can use stat as others recommended, but stat can be expensive. Stat
is good for getting all permissions, but if you just want to see if you
can write, execute or read a file, try using the file test operators.
For example, to see if a file is writable:
if (-w $filename) { ... }
Sara
lf = shift;
my ($seconds) = @_;
#the problem is that now access method is also set to seconds!
$self->[$TOTAL_ACCESS_TIME] += $seconds;
}
I would be greatfull for any help.
Regards
Sara
--
Get your firstname@lastname email for FREE at http://Nameplanet.com/?su
--
To unsubscri
Adding $edgar/ seemed to fix it. If I seem pretty clueless, it's because
I've been programming for all of two days.
Thanks again,
Campbell
When I do that I get yet another error message:
print() on closed filehandle main::FILE at /home/Campbell/perl/Get.Info line
9
Which is what made me try ">$file" to begin with. *shrug*
Thanks,
Campbell
-Original Message-
From: Andrew Nelson
To: 'Sara Campbe
I have this bit of code:
#!/usr/bin/perl -w
$edgar = "/home/Campbell/perl/edgar"
opendir (EDGAR, $edgar) or die "Can't find $edgar!\n";
while ($file = readdir EDGAR) {
open (FILE, ">$file");
print FILE;
}
When I run the program I get this error message:
Use of uninitialized
125
Any feedback will be appreciated. This is currently running on a Unix
server.
Thanks
Sara S.
[EMAIL PROTECTED]