- or download this
#use strict;
- or download this
if ($imagefile =~ m/src=\"\//i) {
$imagefile = "\/" . $';
...
elsif ($imagefile =~ m/src=\"/i) {
$imagefile = $';
}
- or download this
$imagefile =~ s|src="/?||;
- or download this
$imagefile =~ s|src="/?(.*)"$|/$1|;
- or download this
# check to see if this image file is in the eMedSample path
if ($path =~ m/([a-zA-Z0-9\_\-\/])+MMS-Apps\/eMedSample/i) {
$ImageFilePath = "MMS-Apps/eMedSample/WwwRoot" . $imagefile;
}
- or download this
$path =~ m{[\w/-]+MMS-Apps/eMedSample}i
- or download this
use List::Util qw( first );
...
my $match = first { $path =~ $_->{pat} } @pattern_prefix;
$ImageFilePath = $match ? $match->{pre} . $imagefile
: "Not sure what the path is here: $path\n";
- or download this
# This function in addition to
sub ReportFileFound {
my ($filename, $imagefile, $linenum, $bBuildFilePath) = @_;
- or download this
# call as ReportFileFound({ filename => $fn,
# imagefile => $if,
...
my $args_ref = shift;
# use $args_ref->{filename} for $filename
- or download this
my $aLength = $#FinalImageFileList + 1;
- or download this
my $aLength = scalar @FinalImageFileList;
- or download this
foreach $tmpImageFile (@FinalImageFileList) {
...
$bFound = 1;
last;
}
- or download this
$bFound = scalar first { $_ eq $imagePath } @FinalImageFileList;
- or download this
open hFile, $filename or die "Failed to open $filename\n";
- or download this
open hFile, '<', $filename
or die "Can't read '$filename': $!\n";
- or download this
if ($line =~ m/src="([a-zA-Z0-9\_\-\/])+\.(gif|jp[e]?g|bmp)"/i
+) {
$line = $&;
ReportFileFound($saved_name, $line, $linenum, 1);
}
- or download this
if ($line =~ m{(src="[\w/-]+\.(?:gif|jp[e]?g|bmp)")/i) {
$line = $1;
ReportFileFound($saved_name, $line, $linenum, 1);
}
- or download this
sub CheckForImageReferencesInSQL {
my($server, $username, $password, $DB) = @_;
use MSSQL::Sqllib;
- or download this
foreach $QueryResult (@QueryResult) {
foreach $row (keys %$QueryResult) {
- or download this
@ARGV = (".") unless @ARGV;
- or download this
unlink $g_logfile;
- or download this
or die "Can't unlink '$g_logfile': $!";
- or download this
open hLOGFILE, ">>$g_logfile" or die "Could not open the file $g_logfi
+le\n";
- or download this
open hLOGFILE, '>>', $g_logfile
or die "Could not append to '$g_logfile': $!\n";