473,473 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Quick question -- script issue

I pulled this script out of a larger one to test, and I can't figure it out.
If I keep this script in the same directory as the files I want to read, it
works fine, but if I move the script out of it, no dice. Am I missing
something?

Thanks

Being script:
#!/usr/bin/perl

opendir(DIR, "/Users/jack/Sites/tempdir") || die "Can't open dir -- $!";
@files = grep(/article.*\.toformat/, readdir(DIR));
closedir(DIR);

foreach $file (@files) {
open(FILE,"<$file");
my($template)=<FILE>;
print "$template";
close(FILE);
}

Jul 19 '05 #1
1 1667
jack <ja**@raxo.net> wrote in message news:<BB6E7A1C.371%ja**@raxo.net>...
Subject: Quick question -- script issue
That contains _zero_ information. No, actually that's not true. It
contains the information "I'm to selfish/lazy/arrogant to bother
thinking about my subject lines". Is that really what you wanted to
tell us?
I pulled this script out of a larger one to test, and I can't figure it out.
If I keep this script in the same directory as the files I want to read, it
works fine, but if I move the script out of it, no dice. Am I missing
something?


Manuals.

No less than half the manpage of one of the functions you are using is
devoted to forewarning you about the mistake you have just made.
Don't worry just about everyone makes the mistake the first time they
use this funtion - I know I did. The test of character is if you have
the self discipline to go RTFM when things go wrong.

Guessing which function I'm talking about is left as an execise for
the reader. (Hint, it is one that has something to do with
directories).

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.