I have a text file that contains variables that looks like this:
255.255.255.255 domain.com smtp.domain.com user name <user\@domain.com> sendto <sendto\@sendto.domain.com></p? I use:
open (VARIABLES, "<variables.dat"); @Variables=<VARIABLES>; close VARIABLES;
to read the variables into an array. However, when I try and take user name <user\@domain.com> which is $Variable3 to send an email, only user name is recognised. I am losing <user\@domain.com>. What is wrong here?
Should I be using placeholders? Is there a better way to read variables with special characters into an array? Are the variables being loaded properly, but I need to handle them differently in the script?
I did not think that < and > were special charaters, and adding a \ infront fo them does not help my script. Any thoughts on which way I should direct my learnings?
Please advise,
Simon
In reply to reading scalars from text file by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |