in reply to Re^5: Ignore given character from file
in thread Ignore given character from file

you mean something like this?

use warnings 'all'; use strict; use autodie; open my $input, '<', $ARGV[0]; open my $out, '>', 'hex.txt'; while (my $sentence = <$input>) { my $substring = '...pck.*?\.c'; $sentence =~ s{$substring}{}; print $out unpack 'H*', $sentence; }

and thank you for the nice explanations :D