> > >----- Original Message ---- >From: Paul Lalli <[EMAIL PROTECTED]> >To: beginners@perl.org >Sent: Monday, June 18, 2007 6:47:05 PM >Subject: Re: Command line usage > >On Jun 18, 10:50 am, [EMAIL PROTECTED] (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
Thank you all for your responses. Paul's suggestion above is the winner. The command works, creates a neat backup file and does what it's told. I'll be checking the docs to see *why* it works:) Best regards, John Degen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ ____________________________________________________________________________________ Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/