Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Swapping a record in a File

by rob_au (Abbot)
on Dec 29, 2003 at 12:37 UTC ( #317417=note: print w/replies, xml ) Need Help??


in reply to Swaping a record in a File

For this problem, I would consider the use of Tie::File with some code similar to the following:

use Tie::File; tie my @array, 'Tie::File', 'test.data' or die $!; for my $index (0 .. $#array) { unshift @array, splice(@array, $index, 1) if $array[$index] =~ /33 +3/; } untie @array;

 

perl -le "print+unpack'N',pack'B32','00000000000000000000001010100010'"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://317417]
help
Chatterbox?
[Corion]: This is a toy clone of Jekyll, currently named MrHyde. But maybe I'll change that name to Jokel / Yokel, or some other play on the name , still mildly unfunny ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2018-05-22 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?