Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: Re: Hidden Characters?

by Fastolfe (Vicar)
on Nov 14, 2000 at 02:29 UTC ( [id://41455]=note: print w/replies, xml ) Need Help??


in reply to Re: Hidden Characters?
in thread Hidden Characters?

Two questions:
  1. Does the output of 'which perl' (on the command-line) differ from the first line of your Perl script (in other words, are you calling two different versions of the same Perl executable)? Perhaps it's the Perl binary itself that's giving you this error message.
  2. Try viewing your script with 'vi' or 'view', which typically gives you a better view of any embedded control characters (such as an evil trailing DOS newline). A standard pager (like less or more) typically ignores trailing ^M's. Emacs may also.
  3. Do you have 'lsof' on your system? Is there any way you can identify any other applications that might have this script open? Perhaps Emacs is somehow continuing to hold a lock?
The open syscall can fail with this message (ETXTBSY), but usually only if the requested file is being executed (which may not be the case or make sense in this instance, since Perl scripts aren't so much executed as they are read by the Perl interpreter) when an open request comes in with O_WRONLY or O_RDWR flags. This doesn't really make a lot of sense.

What operating system are you using? I'd like to dig further on the cases where you'd get this message. I'd also kinda like to see the first line of your script, the location of your Perl binary, and the permissions of your script.

Replies are listed 'Best First'.
RE: RE: Re: Hidden Characters?
by tame1 (Pilgrim) on Nov 14, 2000 at 21:41 UTC
    Let's see....ok. The "regular" perl binary is /usr/bin/perl (which is itself a link to /usr/bin/perl-5.00503

    My shebang is #!/usr/local/bin/perl -w which is a symlink to /usr/bin/perl

    So yes, there are two levels of syms involved.
    However, I think one of the earlier guys had it - my emacs is saving in DOS mode. Why, I have no idea. How to stop it, I also don't know. Does anyone?

    What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"
      I disagree. If emacs were saving in DOS mode (which means the newlines are comprised of a ^M^J (\r\n) instead of the Unix ^J (\n)), copying the file with 'cp' should have no effect whatsoever. 'cp' does not do any conversions, so it makes 0 sense that the problem would clear up simply by coping the file to a new name. This is why I think it's a filesystem/OS issue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found