#!/usr/bin/perl use strict; use warnings; my $sometext = 'somefile.txt'; open(SOME, $sometext); while() { chomp; $a = $_; $a =~ s/'//g; print $a; }