Re: how to work with ^@ ^M ^D etc. ?

2006-03-10 Thread Eugeny Altshuler
How to replace character which looks in vim like ^@ ^M ^D ? s/\cM/###/g; Great! Thanks! Altshuler Eugeny -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

multistring replacement

2006-03-08 Thread Eugeny Altshuler
Hello! I have such problem, I need to make multistring replacement... How can I do this? I tried to make perl script which acquires file form STDIN and prints result into STDOUT cat file.html | ./myscript I work with html-files and I want to convert them into necessory format. I want to delete

Re: multistring replacement

2006-03-08 Thread Eugeny Altshuler
That's one way to pass the file content to a script via the STDIN filehandle. A shorter way is to pass the filename to the script: $ ./myscript file.html Try out this code: #!/usr/bin/perl use strict; use warnings; open my $fh, $ARGV[0] or die can't open passed file '$ARGV[0]': $!;

how to work with ^@ ^M ^D etc. ?

2006-03-08 Thread Eugeny Altshuler
How to replace character which looks in vim like ^@ ^M ^D ? I try to parse file generated by soft to my mobile for comfort reading. Thanks, Altshuler Eugeny -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/