execute perl script as passed argument

Im trying to execute a perl script as a passed argument from the command line. I compiled a c file and named it "Test", so trying to pass an argument I try this

>Test perl -e "print qq{A\n}x500"

which I want to mean, run Test file and pass 500 A's, but it seems to not be working

Answers


Why do you think it should work? It runs Test and passes 3 arguments to it - perl, -e, "print qq{A\n}\x500". In bash it would be:

Test `perl -a "print qq{A\n}x500"`

For windows, there is no simple way to get a programs output as a variable or pass it to another command directly.

See this post, it describes how set a commands output to a variable.


Need Your Help

Python class methods overloading

python oop

How can I overload class methods?

Hide/show formview when no value selected from dropdownlist

c# asp.net

I have two dropdownlist, a detailsview and a formview control in my page. The first dropdownlist has a list of categories of books, while the second dropdownlist has a list of books based on the se...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.