in reply to Literal Source Parameters At Runtime
perl also has the -P option , which passes the program through the C preprocessor before exectution. So, using that option, you could use the exact same approach as you are in C++, using a #define.
Output:#! /usr/bin/perl -P use strict; #define assert(exp) { if (!(exp)) { printf("assertion failed %s\n", #e +xp); } } my $var = 30; assert($var == 32); exit 0;
assertion failed 30 == 32
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
In Section
Seekers of Perl Wisdom