HI there.
i've tried chomp, trim, and string::util text::trim and i can't seem to get anything to work.
I'm simply globing a directory of files into an array, then adding a "," to them and printing out the list. i am pushing the list of filenames with the comma added into an array using PUSH, but when i go to print the filenames back out their is trailing white space. But on line 30 when i print the filenames before they are pushed into the array the white space isn't there.
i want to use the $baseurl, and list to produce a list 123.psd,345.psd,543.psd not 123.psd, 345.psd, 543.psd
#!/usr/bin/perl -w
use File::Find;
use File::Copy;
use Net::SMTP;
use File::Basename;
use File::Slurp;
use Net::FTP;
use Email::Send::SMTP::Gmail;
use String::Util ':all';
use LWP::Simple;
use Cwd;
chomp($myname = `id -un`);
my $dir ="/Users/$myname/Desktop/";
my $logname = 'content.csv';
my $output = "> /Users/$myname/Desktop/$logname";
use POSIX qw(strftime);
my $date = strftime("%m-%d-%y",localtime);
my $time = strftime("%I:%M:%S",localtime);
my $comma = ",";
my $folder ="/Volumes/photorepos/Partners/NYCompany/post/instock/RUSH/
+";
chdir ($folder);
(@files) = glob "*.psd";
foreach $file (@files){
print "$file".',';
push @list,("$file".',');
crunch(@list);
};
my $baseurl ="http://trueaction.workhorsegroup.us/ServerExport.cfm?Con
+figFile=ServerExportCfg-NYandCFileStatus.inc&FormatOverride=CSV&filen
+ames=";
open FILE, $output or warn "$!";
$content = ("$baseurl@list");
# print FILE "$content";
close FILE;