Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backslashes in NT scripts

Status
Not open for further replies.

Tve

Programmer
May 22, 2000
166
FR
Hi,

I keep having problems with backslashes in my NT perl scripts. Though this is a general, I can give a particular case that does not work...If somebody has a solution, it would reqlly help.

This does NOT work:
$input = "c:\\temp\\*;
@grep = <$input>;

While this does:
@grep = <c:\\temp\\*>;

This is for me not obvious at all!!!

Thanks,

Thierry [sig][/sig]
 
Don't use backslashes. Backslashes are the escape character in Perl strings. Use the Unix directory structure which uses forward slashes and is natively understood by Perl.

eg. $input = &quot;c:/temp/&quot;; will be understood just fine by your Perl script.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top