# first get the File::Comments module from CPAN use File::Comments; my $file = File::Comments->new(); print $file->stripped("city.cpp");