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

[MacPerl] Rename me Perl



I've found an interesting error which might or might not be
known about.  The RENAME command, if you use it, and if you
put the file names in double quotes, and then leave off the
semicolon at the end, will not generate an error (at least
it didn't for me).  Instead, Perl will just throw the
subroutine out.  Example:

#!perl

	&renameME;
	exit( 0 );

sub renameME
{
	rename "myFriend.dat", "myFiend.dat"
}

I came across this in a set of subroutines.  All but the
routine with the rename in it could be found and used.
This one couldn't be.  The original routines were in
separte files and not all together.  So if the above works
and/or gives and error try separating the subroutine from
the main program and put in a "do 'renameME.pl';".  That
should show the error.  :-)