[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] problem specifying path



Have you tried using < at the beginning, like this?

  open (IN,  '<  7500HD :Utilities:MacPerl =3D9F:README') or die $!;



(By the way, you should always die with the value of $! so you know why
you died.)



pns@virginia.edu (Paul N. Schatz) wrote:
>=3D09I am a MacPerl beginner.  I am having the following problem.  I am
>attempting to execute the following script:
>
>******************************
>#!Perl
>open (IN,  '  7500HD :Utilities:MacPerl =3D9F:README') or die;
>while ($line =3D3D <IN>) {
>=3D09print ($line);
>}
>close (IN);
>******************************
>
>=3D09The script doesn't work, and the reason is the blank spaces which
>occur in the name of my hard drive:  There are two blank spaces at the
>beginning and one at the end of "  7500HD ".  I know this is the problem
>because if I rename the hard drive "7500HD", i.e., I eliminate the spaces
>in the name, the script works.  However, if I do this renaming, other
>things break, for example various of my AppleScripts.  So I wish to retain
>this awful name which occurred a long time ago during a fit of stupidity.
>
>=3D09I have tried everything I can think of to get the script to work
>including:
>=3D09using backslash-space in place of each space;
>=3D09using the octal or hexidecimal equivalents of the ascii code for
>each space;
>=3D09using %20 for each space---which is what Netscape does;
>=3D09using Ctrl-V-space for each space;
>
>=3D09None of these work.  There must be a simple way to do this?
>
>=3D09Paul
>--
>Paul Schatz
>Chem Dept
>University of Virginia
>
># =3D3D=3D3D=3D3D=3D3D=3D3D Want to unsubscribe from this list?
># =3D3D=3D3D=3D3D=3D3D=3D3D Send mail with body "unsubscribe" to macperl-r=
equest@mac=3D
perl.org
>

  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum



# =3D3D=3D3D=3D3D=3D3D=3D3D Want to unsubscribe from this list?
# =3D3D=3D3D=3D3D=3D3D=3D3D Send mail with body "unsubscribe" to macperl-re=
quest@macp=3D
erl.org