#!/usr/local/bin/perl # Strips out the w's from a file ` weights ' that # receive input from a latent variable of interest. # stripw.p > h4d.s3 $w = "h4d" ; $l = 3 ; # How to override min and max values with command line eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; open ( W , "<$w" ) ; open ( WD , "<$w.d" ) ; while( ( $_ = ) && ( $d = ) ) { if ( $d =~ /$l/ ) { print $_ ; } }