[ale] For you PERL Gurus

Mike Fletcher fletch at phydeaux.org
Mon Jun 28 12:45:57 EDT 1999


>>>>> "Zhongbin" == Zhongbin Yu \"jerry\" <Zhongbin> writes:

    Zhongbin> my $fileName = "/home/ryan/doc/blankedFile"; open FILE,
    Zhongbin> "< $fileName" or die "Can't open $fileName for
    Zhongbin> reading!. Err is $!\n"; while(<FILE>) { s/\n\n/ /g;
    Zhongbin> print } close(FILE); exit(0);

    Zhongbin> If you are doing it on Windows, you may need to pay
    Zhongbin> attention to your path / or \.

	Yes and know.  Most of the recent subunixen ports of perl are
smart enough to handle / in paths for all of the internal IO operators
(open, chdir, etc.).  But if you pass a wrongslashed path to an
external program (as an argument to a program run by system() or
exec() for example) those probably won't know what you mean and will
die a horrible death (which could be seen as putting it out of its
misery seeing as how it was on winbloz anyhow . . . :).

-- 
Fletch                |                                            __`'/|
fletch at phydeaux.org   |       "I drank what?" -- Socrates          \ o.O'
678 443-6239(w)       |                                            =(___)=
                      |                                               U






More information about the Ale mailing list