in reply to question about finding strings?
"...thoughts on how to test..."
Consider Test::More:
#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 3; use feature qw(say); my $string = q(Lorem ipsum kizuaheli); say $string; $string =~ m/^.+(.{3})(ipsum)(.{3}).+$/; ok( $1 eq q(em ), qq(\$1: $1) ); ok( $2 eq q(ipsum), qq(\$2: $2) ); ok( $3 eq q( ki), qq(\$3: $3) ); __END__ karls-mac-mini:monk karl$ ./tryna.pl 1..3 Lorem ipsum kizuaheli ok 1 - $1: em ok 2 - $2: ipsum ok 3 - $3: ki
The more test-driven monks may forgive me.
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
|
---|