[Linux-disciples] help me write a shell script
Stephen R Laniel
steve at laniels.org
Thu Jul 17 09:50:08 EDT 2008
On Thu, Jul 17, 2008 at 09:45:57AM -0400, Stephen R Laniel wrote:
> my $file_contents = read_file('/path/to/filename');
> $file_contents =~ s#/\*.*?\*/##g;
Make that last line
$file_contents =~ s#/\*.*?\*/##gsm;
The 'sm' bit at the end makes Perl
behave properly with multiline strings.
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
More information about the Linux-disciples
mailing list