- or download this
#!/usr/bin/perl
use XML::Simple;
...
foreach $file (@xmlfile){
$xml = $ipath.$file;
}
- or download this
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"};
- or download this
print "Other Cars<br>";
...
$exportid = "$config->{Header}->{ExportID}";
$numveh = "$config->{Summary}->{NumberOfVehicles}";
$memid = "$config->{Header}->{MemberID}";
- or download this
$lineno = 10;
$vehicleno = 1;
...
$make = "$vehicle->{Manufacturer}";
$model = "$vehicle->{Model}";
[...]
- or download this
$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}";
- or download this
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};');
}
- or download this
###########Write CSV############
...
$trim =~ tr/,//d ;
open (FILENAME,">$add3");
- or download this
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";
- or download this
print FILENAME join(',',
$exportid.$lineno, #$add5 is defined this way some lines before
...
[...]
@image,
)."\n";
- or download this
close FILENAME ;
print "<table width=400>";
...
rename ($ipath.$image1, $ipath.$jpg1);
print "<td colspan=2>Image 1 Renamed</td></tr>";
}
- or download this
$Char = "a";
for (@images) {
next if $_ eq ''; # if you didn't filter them above
rename $ipath.$_,$ipath.$add5.$add6.($Char++).'.jpg';
}
- or download this
opendir THEDIR, "$ipath";
for $file (grep (/$str/, readdir THEDIR)) {
# Do the work
}
closedir THEDIR;