I'm using a (pre-existing) script to generate a text file. In fact, it's a C++ header file. At the top of the file I'd like to add this text, which can be added by passing a parameter (to the script) called --fhead:-

#ifndef (__ATK_H_INSIDE__)
#error "Only <atk.h> can be included directly."
I'm not having any problems with the first line or the last line but in the middle line, those angle brackets are causing a problem. I can work around it by using quote marks, instead of the angle brackets. For example, this wouldn't (ordinarily) print from the Perl script:-

perl the_script.pl --fhead "#error "Only "atk.h" can be included directly.""
But if I format the text properly - i.e.

perl the_script.pl --fhead "#error \"Only \"atk.h\" can be included directly.\""
I get this in the eventual file:-

#error "Only "atk.h" can be included directly."
If all else fails, the above would be acceptable - but ideally, I'd prefer to have angle brackets - i.e.

#error "Only <atk.h> can be included directly."
My problem is that I can't find any way to format the text such that the angle brackets get considered as part of the text (rather than instructions to the Perl interpreter).

Any ideas, anyone...