Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
good chemistry is complicated,
and a little bit messy -LW
 
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'"


Comment on Re: Swapping a record in a File
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://317417]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-04-20 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls