#!/usr/bin/perl use warnings; use strict; my %replace = (name => 'Joe', fun => 'a game'); while (<DATA>) { for my $key (keys %replace) { s/\$$key/$replace{$key}/g; } print; } __DATA__ Hullo $name, are you ready for $fun?
In reply to Re: Uer Perl Variable in file
by choroba
in thread Uer Perl Variable in txt file
by vinaybond
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |