Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
okey, okey, it was about the idea not about the execution. The idea is that you could wish (or not) to make the replacement before populating your array. It depends on your specific case or goals Replacing a special character by something, full version
Returning to the question I have an array with some special character like '*' and i want to print " " (space ) every where I find this '*'
By "print everywhere" I'm understanding (maybe incorrectly) "everywhere in my array". You are not printing to your array. You are printing to a filehandle that contains and points to... well... who knows. Scalar. Not an array. If you want to modify your array, the idea could be: if some element of my array eq to '*' reasign again this element to ' ' if($dlog2[$co] eq '*'){ $dlog2[$co] = ' '}Or maybe, to clean your problematic characters before, with a global replacement, and forget about the '*' in your file. In reply to Re^3: Replacing a special character
by pvaldes
|
|