Re: Command line usage
- From: mritty@xxxxxxxxx (Paul Lalli)
- Date: Mon, 18 Jun 2007 09:47:05 -0700
On Jun 18, 10:50 am, jeehan...@xxxxxxxxx (John Degen) wrote:
I think I'm out of luck with this OS;) Your suggestion for creating a backup
file gave the same result: no error, no change in the files. The output of
'perl -le"print for @ARGV" *' is * and the other is *.*. Funny though that
sed *does* work.
Ah. Well there's your problem. The command line interpreter you're
running doesn't expand wildcards. That's why Perl wasn't giving you
any errors - it had nothing to do because there was no file named "*"
that it could find... You'll have to expand the wildcard from within
Perl.
perl -pi.bkp -e"BEGIN { @ARGV = glob($ARGV[0]); } s/old/new/;" *
Hope this helps,
Paul Lalli
.
- References:
- Re: Command line usage
- From: John Degen
- Re: Command line usage
- Prev by Date: Re: [Perl 5.8.8 on WinXP] Command line usage
- Next by Date: Inter-thread communications
- Previous by thread: Re: Command line usage
- Next by thread: Re: Why must I chomp a variable set in a script? (Problem Solved)
- Index(es):
Relevant Pages
|
|