lloder174 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w ###-DDEBUGGING -d -Dslt` use Env; use English ( no_match_vars ); local $INPUT_RECORD_SEPARATOR; my $searchPattern = "(^\#!/usr/bin/perl.*?\n)"; my $insertion = "\nuse English \( no_match_vars \);\n"; #my $content = "#!/usr/bin/python\n"; my $content = "#!/usr/bin/perl\n"; print "content = \n$content \n"; print "insertion = \n$insertion \n"; $content =~ s?${searchPattern}?${1}${insertion}?xmsp; print " content now = \n$content \n"; exit 0;
20090430 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: junior application developer
by johngg (Canon) on Apr 29, 2009 at 21:35 UTC | |
by lloder174 (Novice) on Apr 29, 2009 at 22:06 UTC | |
by whakka (Hermit) on Apr 30, 2009 at 01:52 UTC | |
by AnomalousMonk (Archbishop) on Apr 29, 2009 at 23:06 UTC | |
by johngg (Canon) on Apr 30, 2009 at 08:25 UTC | |
|
Re: junior application developer
by ELISHEVA (Prior) on Apr 30, 2009 at 07:57 UTC | |
by lloder174 (Novice) on Jun 03, 2009 at 12:56 UTC |