Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From your answer I already understood what the problem was. The output of the perl command contained characters that where causing the problem. I don't know which exactly, but some of them could be interpreted by bash (like / and $ for example.)
I am going to look for an anternitive way to accomplish what I want.
When I add `perl file` to a variable (like so a=`perl file.pl`), the variable also gets that different value than when the perl command is just run from the command line.
The file.pl file actually contains hexadecimal characters that are converted to ascii characters when the file is executed.
When I make use of command substitution with the perl command, some characters put on the screen are different than when the perl command is just run from the command line. Can you tell me why that happens?
I meant the difference between the characters that are put on the screen when the perl command is just run from the command line and when I implement command substitution with the perl command.
Sorry I can not explain that well.
Like so:
Code:
1# perl file.pl
Code:
2# eval "echo `perl file.pl`"
It seems to me that both commands would output the same charcaters, but there are some differences.
If I make use of the '\xBF' character for example, with the first command:
Never mind the last question. The problem of the difference in characters was caused by a minimal version of Cygwin that I am using. It does not happen on my Linux system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.