below is my script
#!/usr/bin/perl -w # This script will process the old and new attributes # and then get a html file , grab aall the old attribute then # replace it with the new attributes $html_file = "/export/home/achhabra/example.html"; $Attribute = "/export/home/achhabra/Attributes.txt"; open (F, "$Attribute") or die ("can't open $Attribute : $!\n"); while(<F>) { chomp $_; @attributes = split(/ /, $_); $attributes_hash{$attributes[0]} = $attributes[1]; } close(F); open (H, "$html_file") or die ("can't open $html_file : $!\n"); foreach $attribute (%attributes_hash) { while(<H>) { system(":%s/\$attribute/\$attributes_hash{attribute}/g"); } } close(H);
In reply to Hash Arrays by asheesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |