Subject:
|
perl question
|
Newsgroups:
|
lugnet.off-topic.geek
|
Date:
|
Thu, 3 Feb 2005 20:41:43 GMT
|
Viewed:
|
1488 times
|
| |
| |
Pointers to where to look in the perl docs or Faq on cpan.org gladly taken.
I have a perlscript I want to run on both wintel and linux, and I want to invoke
it from an outer script. (.bat on wintel and some shell script, sh, ksh, bash
or csh on linux)
It takes parms which I am accessing from @ARGV. (via shift to be exact) On
Linux I am having trouble with a trailing char being tacked on to the last parm.
I got around it by tacking an extra bogus parm on the end so that one is crud
but I'd rather process it cleanly.
I tried chomp but that's not cleaning it off. This linux box has some bogus vi
(vim?) on it that's trying to be helpful and hide chars like ^M from me so I
can't quite tell if the shell script itself has some junk or not at the end.
I am running under bash but my shellscript could theoretically run under
different shells... I tried #!/bin/ksh and #!/bin/sh but that didn't seem to
make a difference.
Perl on wintel is working fine. It's v 5.6.0 and the linux box is v5.6.1
PRETTY sure I ftped everything over in ascii so not sure where these trailing
chars are coming from, hence my suspicion that it's something else I did wrong
or some diff I didn't account for.
|
|
Message has 1 Reply: | | Re: perl question
|
| (...) You can try this: od -c scriptfile.pl and look for \r chars (in addition to the usual \n chars) to see if that's the problem. (20 years ago, 4-Feb-05, to lugnet.off-topic.geek)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|