NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
/ Works on Windows (Score:1)
At least on Win32 with ActiveState ActivePerl, /path/file args on its commandline; most prefer the ne
chdir('/some/where')works fine. About the only place on Win32 that / doesn't work mix-and-match with \ separators is in the File Open / Save Dialog (and a few other 16-bit hold over system calls; it depends on which file-open API a program uses whether it can acceptBill
# I had a sig when sigs were cool
use Sig;
Re:/ Works on Windows (Score:2)
Plus anytime you use File::Spec with several other modules that require a '/' path delimiter. In fact can anyone who writes module for CPAN, please remember that File::Spec and File::Find are ONLY compatible on Unix like systems. There have been several modules that have failed CPAN testing because of it.
Re:/ Works on Windows (Score:2)
Can you give us some examples of modules that use '/' as path seperators?
Re:/ Works on Windows (Score:2)
Say for example you use File::Find to find a list of files, you then store them in a hash as keys. Later you use File::Spec to build a file path, and verify whether the file exists in the hash. On Windows the file will never be found
lexical? (Score:1)
The great thing about multitasking is that several things can go wrong at once.
Re:lexical? (Score:2)
Portable chdir('/'); (Score:1)
If one is at the root of the filesystem on *NIX (root of volume on OS's?) Then
@CWDis the empty list. However, setting@CWD=();leaves your process in its current location, at least on Perl 5.8.0 on Linux with File::chdir 0.06.This, a portable way to get to the top of the directory structure, would be a great feature and it seems that some thought has been given to implementing such a thing. There is a
sub CLEARdefined in the package which sets a package variable but the directory position remains unchanRe:Portable chdir('/'); (Score:2)
local $/ (Score:1)
In all that talk about not changing the current directory for other parts of the program,
$/got stomped on heavily.All examples should use
local $/;instead of$/ = undef;.--
Hofmator
--
Hofmator