[Linux-disciples] Deleting all non-ASCII characters
Jamie Forrest
jamie at honksandsirens.com
Thu Jul 17 13:02:20 EDT 2008
Also for historical purposes, this concise perl script will do
everything I need to do:
#!/usr/bin/perl
use strict;
use warnings;
my $file_contents = join( '', <> );
$file_contents =~ s#/\*.*?\*/##gsm;
$file_contents =~ s#[^[:ascii:]]##g;
$file_contents =~ s/roast/roastqa/g;
print $file_contents;
On Jul 17, 2008, at 12:38 PM, Stephen R Laniel wrote:
> On Thu, Jul 17, 2008 at 10:43:36AM -0400, Stephen R Laniel wrote:
>> I believe that can actually be reduced
>> to this one-liner:
>> perl -n -e 's#[^[:ascii:]]##g' /path/to/file
>
> For the historical record: I meant -p
> rather than -n.
>
> --
> Stephen R. Laniel
> steve at laniels.org
> Cell: +(617) 308-5571
> http://laniels.org/
> PGP key: http://laniels.org/slaniel.key
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20080717/be921544/attachment.htm
More information about the Linux-disciples
mailing list