Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Write a Perl program with a specific heuristic to take care of it. Something like:
    • Read in all the lines of the file
    • Walk thru the lines finding the one with bind parm 1. That's line $x.
    • Make sure that $line[$x+1] is bind parm 2, or else die because your heuristic isn't right.
    • @line[$x,$x+1] = @line[$x+1,$x];
    • $line[$x] =~ s/2/1/;
    • $line[$x+1] =~ s/1/2/;

    Or thereabouts. Seems to me that you don't need to switch the parms, but rather switch their bind numbers.

    It's a quick throwaway tool, but that's

    --

    --
    xoa