If I want to run a script on any file with a .vhd extension in the
directory, how do I pass *.vhd to the perl script?

 

Easy one-line example (Note, I'm running on Windows): Say I want to find the
pattern "COMPONENT" in any file with a .vhd extension:

perl -lane "if (/COMPONENT/) { printf \"$ARGV $. : $_\n\" }" *.vhd

gives the error: 

Can't open .*vhd: Invalid argument.

 

I need an answer that will work for full-blown scripts, as well as
one-liners.

 

Thanks!

 

Samir

 

 

 

Reply via email to