#! /usr/bin/perl use strict; use Digest::MD5 qw/md5_hex/; my $str; while () { chomp; my ( $key, $value ) = split /\s*=\s*/; $value = md5_hex( $value ) if $key eq 'PASS'; $str .= $key . ' = ' . $value . $/; } print $str; __DATA__; NAME = DamnDirtyApe PASS = HestonRules #### #! /usr/bin/perl use strict ; use warnings ; use Tie::File ; my $filename = shift @ARGV ; tie my @lines, 'Tie::File', $filename or die "Can't open file: $!" ; for ( 0 .. $#lines ) { if ( $lines[$_] =~ /du/ ) { print map { $_ . $/ } @lines[$_-2..$_] ; } } #### [root@h24-69-83-179 Lib-Simple-0.0.1]# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Lib::Simple [root@h24-69-83-179 Lib-Simple-0.0.1]# make Makefile:457: warning: overriding commands for target `Lib-Simple-VERSION_SYM' Makefile:449: warning: ignoring old commands for target `Lib-Simple-VERSION_SYM' Makefile:457: warning: overriding commands for target `=' Makefile:449: warning: ignoring old commands for target `=' cp lib/Lib/Simple.pm blib/lib/Lib/Simple.pm Manifying blib/man3/Lib::Simple.3 [root@h24-69-83-179 Lib-Simple-0.0.1]# make test Makefile:457: warning: overriding commands for target `Lib-Simple-VERSION_SYM' Makefile:449: warning: ignoring old commands for target `Lib-Simple-VERSION_SYM' Makefile:457: warning: overriding commands for target `=' Makefile:449: warning: ignoring old commands for target `=' PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', '')" t/*.t t/test....ok All tests successful. Files=1, Tests=44, 0 wallclock secs ( 0.23 cusr + 0.02 csys = 0.25 CPU) [root@h24-69-83-179 Lib-Simple-0.0.1]# make install Makefile:457: warning: overriding commands for target `Lib-Simple-VERSION_SYM' Makefile:449: warning: ignoring old commands for target `Lib-Simple-VERSION_SYM' Makefile:457: warning: overriding commands for target `=' Makefile:449: warning: ignoring old commands for target `=' Use of uninitialized value in -d at /usr/local/lib/perl5/5.8.0/File/Path.pm line 141. fileparse(): need a valid pathname at /usr/local/lib/perl5/5.8.0/File/Path.pm line 142 make: *** [pure_site_install] Error 255