my @fixCur =($hardwareValue1, $hardwareValue2); checkCurrency(@fixCur); sub checkCurrency{ for (@_){ if ($currency == "Euro (EUR)") { $_ =~ s/€//g; }elsif ($currency == "Japan, Yen(JPY)") { $_ =~ s/Â/ /g; }elsif ($currency == "United Kingdom, Pound(GBP)") { $_ =~ s/Â/ /g; } } } #### open(PDF, "LeasevsBuy.pdf") or die "could not open PDF [$!]"; binmode PDF; close(PDF); print "Content-Type: application/pdf\n"; print "Content-Length: " .length($output) . "\n\n"; print ;