I got this reply in email. I think it may be interesting for others as
well. [I edited it slightly to adjust it to usenet quoting conventions.]
--Cornelius.
Date: Mon, 08 Feb 1999 15:17:08 -0600
From: Joe King <joe.king at gcg.com>
Organization: Genetics Computer Group
Subject: Re: help: Reformat does not work properly in a Perl script
Cornelius Krasel <krasel at wpxx02.toxi.uni-wuerzburg.de> wrote:
> Alex Dong Li <lidong at globalserve.net> wrote:
>> I am tring to call GCG's reformat command in a perl script by the following
>> line so that I can reformat all *.seq files in a directory:
>> system("reformat *.seq");
Some one replied, correctly:
> This is probably only one of many possible ways:
>> @dir = `ls *.seq` ;
> foreach $f ( @dir ) {
> system("reformat $f");
> }
Another (faster) method is:
system("reformat \\*.seq");
You have to protect the "*" from the shell. GCG expands all
wildcards. You duplicate the backslash, in this instance, to
protect it from perl. Of course, you can always quote it
differently:
system('reformat \*.seq');
Cheers,
Joe
--
Joseph J. King, Ph.D., Project Leader
Genetics Computer Group
phone: 608.231.5219 ext. 104 fax: 608.231.5202
email: joe.king at gcg.com web: http://www.gcg.com