Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Strip-block-comments/Perl/strip-block-comments.pl
Normal file
13
Task/Strip-block-comments/Perl/strip-block-comments.pl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/perl -w
|
||||
use strict ;
|
||||
use warnings ;
|
||||
|
||||
open( FH , "<" , "samplecode.txt" ) or die "Can't open file!$!\n" ;
|
||||
my $code = "" ;
|
||||
{
|
||||
local $/ ;
|
||||
$code = <FH> ; #slurp mode
|
||||
}
|
||||
close FH ;
|
||||
$code =~ s,/\*.*?\*/,,sg ;
|
||||
print $code . "\n" ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue