in reply to Re: Replacement of Bracketed Expressions for JSON output
in thread Replacement of Bracketed Expressions for JSON output
I was thinking about using using s// as I will be reading in multiple file lines by line, e.g:
[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,0,28],[0,27,0,29],[0,28,0,30]and the details of the units for the replacements are contained in:
$node,e.g.
[-1,-1,0,28],which will be replaced by other details contained in $newnode, e.g.
[1,30,2,34],which is being uniquely generated on the fly.
I was wondering if there is a way to have an effect of say:
$line =~ s/$node/$newnodeAfter which $line is printed to an output file?
Thanks again!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Replacement of Bracketed Expressions for JSON output
by roboticus (Chancellor) on Feb 28, 2011 at 10:55 UTC | |
|
Re^3: Replacement of Bracketed Expressions for JSON output
by ikegami (Patriarch) on Feb 28, 2011 at 17:07 UTC |