Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
wats wrong in this expression

Posted by revtopo (revtopo), 27 August 2007
hi there,

I have to write a set of codes in perl using shell scripts. the code that i have to insert in the file is

perl -pe 'print q{ [% IF'\.(css|js|txt)');debug("Passing page through as text: $"); content; ELSE; debug("Applying HTML page layout wrappers to $\n"); content WRAPPER site/html + site/layout; END;-%]} if $.==4' -i Topo/root/lib/site/

the code works on getting the name wrapped.

I have been gettin a syntax error in the line
[% IF'\.(css|js|txt)');
syntax error near unecpected token.

Is that any thing to do with \. in the code.?

thanks in advance.

Posted by admin (Graham Ellis), 27 August 2007
The ' within the code is being taken as the shell string terminator.

I would suggest you save the Perl program in a file and run it from the file rather than trying to write an entire program on one command line

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: • WEB: • SKYPE: wellho