SLUG Mailing List Archives
Re: [SLUG] perl substitution of metacharacter
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] perl substitution of metacharacter
- From: Russell Davies <russell.davies@xxxxxxxxxxxxx>
- Date: Mon Aug 28 11:44:54 2000
; garfield:~# ascii ^@
; ASCII 0/0 is decimal 000, hex 00, octal 000, bits 00000000: called ^@, NUL
; Official name: Null
; So it's just a null so something like
; print $c unless ($c = 0);
no, that's wrong.
- you're assigning not comparing.
- what are you comparing? (what happens if you get a '0' in your
input, or if you've converted to ascii value first, why are you
printing this value and not the character itself?)
- this construct will yield poorer performance than a regexp.