![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting unusual error - moving files to another directory | aismann | Shell Programming and Scripting | 4 | 12-21-2007 12:29 AM |
| Opening Files in append mode | vidhya | UNIX for Dummies Questions & Answers | 1 | 03-27-2006 01:46 PM |
| opening non-html files in lynx?? | riwa | UNIX for Dummies Questions & Answers | 0 | 03-04-2006 02:07 PM |
| Opening files | saarshad001 | UNIX for Dummies Questions & Answers | 3 | 11-28-2003 09:42 AM |
| Opening Files | AJA | UNIX for Dummies Questions & Answers | 4 | 11-10-2003 08:25 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
error while opening files in a directory
I tried opening the files in a directory and print thier names.
But it was thowing the error "unable to open directorty at t5.pl line 2." Can u plz correct this error in below mentioned code. #!/data/scoredev/perl opendir(HOMEDIR,"c:\vin") || die("unable to open directorty"); @files=readdir(HOMEDIR); closedir(HOMEDIR); foreach $file (sort @files) { print ("$file\n"); } unable to open directorty at t5.pl line 2. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Get more information about why you cannot open the directory with
Code:
opendir(HOMEDIR,"c:\vin") || die("unable to open directory: $!");
|
|
#3
|
|||
|
|||
|
How can I open the directory which is in windows in unix perl script.
|
|
#4
|
|||
|
|||
|
I think that you use Unix-style directory separators in Perl -- try
Code:
opendir(HOMEDIR,"c:/vin") |
|||
| Google The UNIX and Linux Forums |