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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

activestate not behaving like unix perl

Status
Not open for further replies.

redss

Programmer
Joined
Oct 20, 2002
Messages
195
I am having trouble getting some one-line perl scripts to work in DOS (activestate) like they work in unix.

examples that work in UNIX but not DOS:
cat junk | perl -p -e 's/old/new/g;'
perl -p -e 's/old/new/g;' foo

Any ideas?
 
cat is a reserved word in Unix, but not Windows Console
This could be your problem

--Paul
 
sorry, I should have mentioned that I have the GNU utilities for DOS installed, so 'cat' is a recognized command on my system...
 
pipes.... pipes are a little strange in DOS based systems

Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
For Windows, Perl one-liners need to be enclosed in double quotes, not single. If you have ActiveState,
take a look at the index.html file in the Perl/html
folder, in particular the topics under Windows Specific.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top