zentara has asked for the wisdom of the Perl Monks concerning the following question:
or something similar that will just reset my next line only?print '[[asc', "done\n" ;
###############################################!/usr/bin/perl #create the Storable file use warnings; use Storable; my %sigs; while (<DATA>){ chomp; ($name,$value) = split(/=/,$_); $valbin = pack 'H*', $value; $sigs{$name}= $valbin; # this one works # $sigs{$name}= qr/\Q$valbin\E/; # this one dosn't } foreach $name (keys %sigs){print "$name\t$sigs{$name}\n";} store(\%sigs, 'z1.bin') or die "Can't store %a in z1.bin !\n"; exit; __DATA__ 10 past 3 (B)=ec020e1ff3a4b82125061fbab300cd21 10 past 3 (C)=b840008ed8a11300b106d3e02d00088e 100-Years=fe3a558bec50817e0400c0730c2ea147 1024-PrScr #1=8cc0488ec026a103002d800026a30300 1024-PrScr #2=a172041f3df0f07505a10301cd0526a1
##################################################!/usr/bin/perl #read the Storable file #use strict; use warnings; use Storable; my %sigs = %{retrieve('z1.bin')} or die "Unable to retrieve from z1.bi +n:$!\n" ; foreach $name (keys %sigs){print "$name\t$sigs{$name}\n";}
Edit by tye to escape [s
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: storing pre-compiled binary regexes
by merlyn (Sage) on Jun 24, 2002 at 21:10 UTC | |
by Random_Walk (Prior) on Apr 14, 2008 at 10:57 UTC | |
by Random_Walk (Prior) on Apr 15, 2008 at 13:31 UTC | |
|
Re: storing pre-compiled binary regexes
by Joost (Canon) on Jun 25, 2002 at 09:19 UTC |