Help for this page
#!/usr/bin/perl use XML::Simple; ... foreach $file (@xmlfile){ $xml = $ipath.$file; }
if (lc($xml) =~ "don"){&doncaster} else { if (lc($xml) =~ "ayl"){$holding = "asmholding"}; ... if (lc($xml) =~ "hills"){$holding = "hilholding"}; if (lc($xml) =~ "windley"){$holding = "wlsholding"}; if (lc($xml) =~ "ppm"){$holding = "ppmholding"};
print "Other Cars<br>"; ... $exportid = "$config->{Header}->{ExportID}"; $numveh = "$config->{Summary}->{NumberOfVehicles}"; $memid = "$config->{Header}->{MemberID}";
$lineno = 10; $vehicleno = 1; ... $make = "$vehicle->{Manufacturer}"; $model = "$vehicle->{Model}"; [...]
$image1 = "$vehicle->{Images}->{Image_1}"; $image2 = "$vehicle->{Images}->{Image_2}"; ... $image10 = "$vehicle->{Images}->{Image_10}"; $image11 = "$vehicle->{Images}->{Image_11}"; $image12 = "$vehicle->{Images}->{Image_12}";
for my $ImgNo (1..12) { # Storing them into an array is easy: ... # or you may want to keep the variable names: eval('$image'.$ImgNo.'=$vehicle->{Images}->{"Image_".$ImgNo};'); }
###########Write CSV############ ... $trim =~ tr/,//d ; open (FILENAME,">$add3");
print FILENAME "Ref No,Make,Model,Trim,Vehicle Sub Class,Colour,Engine + Size,Fuel Type,Transmission,Year,Mileage,Registration No,Keys Suppli ... +$transpeed $trantype,$year,$mileage,$reg,$keyssupplied,$damage,$hasva +t,$starts $drives,No,$abicat,$reserve,na,$memid,$memid,$memid,$memid, +$auctionid,na,\n";
print FILENAME join(',', $exportid.$lineno, #$add5 is defined this way some lines before ... [...] @image, )."\n";
close FILENAME ; print "<table width=400>"; ... rename ($ipath.$image1, $ipath.$jpg1); print "<td colspan=2>Image 1 Renamed</td></tr>"; }
$Char = "a"; for (@images) { next if $_ eq ''; # if you didn't filter them above rename $ipath.$_,$ipath.$add5.$add6.($Char++).'.jpg'; }
opendir THEDIR, "$ipath"; for $file (grep (/$str/, readdir THEDIR)) { # Do the work } closedir THEDIR;
www.com | www.net | www.org
No recent polls found