C
Chip
How can I add a ".jpg" extension to a string?
I'm trying the following with 12345 as the input.
#!/usr/bin/perl -w
print "Please enter the item picture number to remove: ";
my $number=<STDIN>;
my $path=http://someplace.com/images/;
my $ext=".jpg";
my $picture="$path . $number . $ext";
system rm $picture;
print "$picture has been removed";
__END__
The output I'm hoping for is:
http://someplace.com/images/12345.jpg has been removed
What I get is:
http://someplace.com/images/12345 has been removed
How do I add the ".jpg"
Thanks
Chip
I'm trying the following with 12345 as the input.
#!/usr/bin/perl -w
print "Please enter the item picture number to remove: ";
my $number=<STDIN>;
my $path=http://someplace.com/images/;
my $ext=".jpg";
my $picture="$path . $number . $ext";
system rm $picture;
print "$picture has been removed";
__END__
The output I'm hoping for is:
http://someplace.com/images/12345.jpg has been removed
What I get is:
http://someplace.com/images/12345 has been removed
How do I add the ".jpg"
Thanks
Chip