Re: No such file or directory

2008-05-30 Thread Mimi Cafe
Still cannot see why Perl complains that Could not open file for reading. File or directory does exist. I have modified my script and now using Getopt::Long module instead of the @ARGV variable. Can someone take a look? The script is now run with command line options like this: myscript --master

Re: No such file or directory

2008-05-29 Thread Ken Foskey
On Thu, 2008-05-29 at 11:45 +0100, Mimi Cafe wrote: my script is in the same directory as my files, but it cannot find the file ABC.txt in open() below. foreach my $supplied (@ARGV){ # Output file name set of element currently processed. # Open file to read from. open (INPUTFILE, ,

Re: No such file or directory

2008-05-29 Thread Mimi Cafe
I am on Windows so it should not be case-sensitive. The script and all required files in one folder. I pass 2 arguments to the script and can I can open open the file in the $ARGV[0]. my $ad_clients = shift @ARGV; open (ADFILE, , $ad_clients) or die Could not open $ad_clients for reading: $! \n;

Re: No such file or directory

2008-05-29 Thread Jeff Peng
On Thu, May 29, 2008 at 6:45 PM, Mimi Cafe [EMAIL PROTECTED] wrote: my script is in the same directory as my files, but it cannot find the file ABC.txt in open() below. foreach my $supplied (@ARGV){ # Output file name set of element currently processed. # Open file to read from. open

Re: No such file or directory

2008-05-29 Thread Mimi Cafe
I am on Windows so it should not be case-sensitive. The script and all required files in one folder. I pass 3 arguments to the script (script.pl file1 file2 file3)and I can open the first file stored in $ARGV[0] as seen below: my $ad_clients = shift @ARGV; open (ADFILE, , $ad_clients) or

Re: No such file or directory

2008-05-21 Thread Roman
anthony brooke wrote: Hello, I know that this is a very common problem, but I am very sure that the file exist in that directory, also its permission is -rwxrwxrwx , why does it give such an error ? What are the other potential problems that cause this ? Thanks Send instant messages to your

Re: No such file or directory

2008-05-21 Thread anthony brooke
anthony brooke wrote: Hello, I know that this is a very common problem, but I am very sure that the file exist in that directory, also its permission is -rwxrwxrwx , why does it give such an error ? What are the other potential problems that cause this ? Thanks Send instant messages

Re: No such file or directory

2008-05-21 Thread anthony brooke
anthony brooke wrote: Hello, I know that this is a very common problem, but I am very sure that the file exist in that directory, also its permission is -rwxrwxrwx , why does it give such an error ? What are the other potential problems that cause this ? Thanks Send instant messages

Re: No such file or directory

2008-05-21 Thread Jeff Peng
open(RULES, 'rule.pl') please use full path if you don't know where you are exactly. On Wed, May 21, 2008 at 3:45 PM, anthony brooke [EMAIL PROTECTED] wrote: -- Jeff Peng - [EMAIL PROTECTED] Professional Squid supports in China http://www.ChinaSquid.com/ -- To unsubscribe, e-mail: [EMAIL

Re: No such file or directory

2008-05-21 Thread anthony brooke
- Original Message From: Jeff Peng [EMAIL PROTECTED] To: Perl Beginners beginners@perl.org Sent: Wednesday, May 21, 2008 15:53:00 Subject: Re: No such file or directory open(RULES, 'rule.pl') please use full path if you don't know where you are exactly. On Wed, May 21, 2008 at 3:45

RE: No Such File or Directory

2002-10-15 Thread Nikola Janceski
That's not ok. use File::Path; mkpath(); if you want that functionality. -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 2:14 PM To: [EMAIL PROTECTED] Subject: No Such File or Directory Okay, here's a different on,

RE: Dates in file or directory names ?

2002-02-18 Thread Dave Cross
On Sat, 02 Feb 2002 17:11:12 +, Timothy Johnson wrote: -Original Message- From: Dave Cross To: [EMAIL PROTECTED] Sent: 2/2/02 1:01 AM Subject: Re: Dates in file or directory names ? On Thu, 31 Jan 2002 21:20:16 +, Mark Richmond wrote: Ok, so I'm confused

Re: Dates in file or directory names ?

2002-02-02 Thread Dave Cross
On Thu, 31 Jan 2002 21:20:16 +, Mark Richmond wrote: Ok, so I'm confused What I want to do is create a directory where the name is the current date say mkdir(2002131) What Can't figure out is how to build the date string. I'm sure I'm just missing something. Any thoughts. [can you

RE: Dates in file or directory names ?

2002-02-02 Thread Timothy Johnson
Or you can just use localtime(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my $date = ($year + 1900).($mon + 1).$mday; mkdir($date); -Original Message- From: Dave Cross To: [EMAIL PROTECTED] Sent: 2/2/02 1:01 AM Subject: Re: Dates in file or directory names

RE: Dates in file or directory names ?

2002-01-31 Thread Wagner-David
Title: Blank use somehting like: my ($mday, $mon, $year) = (localtime(time))[3..5]; # pull day,month, year only$year+= 1900;# want 4 digit date$mon++;# need to add 1 to month(runs from 0 to 11) my $MyDirectory = sprintf "%04d%02d%02d", $year, $mon, $mday This will mmdd format.

Re: No such file or directory exists

2001-10-24 Thread walter valenti
Hi, look the first line of the script: contains the location of perl's interpreter Most common are: #!/usr/bin/perl #!/usr/local/bin/perl Walter I'm working with my perl scripts in Linux and Windows. my scripts were running fine when I ran them as perl myscript.pl but when I tried to

Re: No such file or directory exists

2001-10-24 Thread walter valenti
:Re: No such file or directory exists Hi, look the first line of the script: contains the location of perl's interpreter Most common are: #!/usr/bin/perl #!/usr/local/bin/perl Walter I'm working with my perl scripts in Linux and Windows. my

Re: No such file or directory exists

2001-10-24 Thread Greg . Froese
That was not the problem. The problem was the ^M at the end of each line walter valenti [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/24/2001 09:11 AM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject:Re: No such file

Re: No such file or directory exists

2001-10-24 Thread Etienne Marcotte
PROTECTED] 10/24/2001 09:11 AM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject:Re: No such file or directory exists Hi, look the first line of the script: contains the location of perl's interpreter Most common are: #!/usr

Re: No such file or directory exists

2001-10-24 Thread Peter Scott
At 09:01 AM 10/24/2001 -0500, [EMAIL PROTECTED] wrote: I'm working with my perl scripts in Linux and Windows. my scripts were running fine when I ran them as perl myscript.pl but when I tried to execute the perl script using only its name (./myscript.pl) then I would get the message No such

Re: No such file or directory exists

2001-10-24 Thread Greg . Froese
elementary? oooh, that hurts =) but you are right, I should have been using -w Peter Scott [EMAIL PROTECTED] 10/24/2001 10:03 AM To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:Re: No such file or directory exists At 09:01 AM 10/24/2001 -0500

Re: No such file or directory exists

2001-10-24 Thread Peter Scott
At 10:12 AM 10/24/2001 -0500, [EMAIL PROTECTED] wrote: elementary? oooh, that hurts =) Hey, everyone does it (or something like it), that's the only reason to call it elementary - because we manage to keep making the same mistakes and forgetting to check the obvious. You want to know how many