Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Does zsh have a hereis to variable???



zzapper wrote:
> Hi
> I would like to load  a longish Perl Script into a variable without having to
>  worry about what
> quotes might appear in the script, I know zsh has hereis to a file, but to a 
> variable ???

I think you want

var="$(<file)"

which puts the contents of file into the variable var without any
substitutions or splitting or joining on the contents.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author