I'm new to perl and i am having a serious problem importing a file into a database. I need a way to replace the backslash with the forward slash.Is it possible buy writing a user defined function? Can anyone please help me... Thanks in advance!
I'm new to perl and i am having a serious problem importing a file into a database. I need a way to replace the backslash with the forward slash.Is it possible buy writing a user defined function? Can anyone please help me... Thanks in advance!
Try this :
Replace variables accordingly...Code:open ULFILE, ">$upload_dir/$filename"; binmode ULFILE; while ( <$upload_filehandle> ) { $_ =~ s/\\//g; print ULFILE; } close ULFILE;
Ok, thanks, i will try it out... But any other code or script? Just in case this doesn't work, Thanks though... Will try your code and get back about it...
Well, try this out :
Hope this works...Code:find -name "*.html" -type f | while read file do awk '{ gsub( /\\/, "/" ); print }' $file > $file.$$ mv $file.$$ $file done
Bookmarks