Dear Monks, I am facing a problem where FTP'ing a file ending with newline characters is creating an issue,please look at the file below am FTPing and notice the "\n" characters,these "\n"characters are messing up my procedure.how should I remove the "\n" characters while FTP'ng.Please advise
open(FILE, ">micro\\config") || die "Wrong Filename"; print FILE ("micro=/mnt/micro/config/\n"); print FILE ("config=/mnt/system/config/\n"); print FILE ("dump=/mnt/dump/\n"); config file gets created as follows micro=/mnt/micro/config/ config=/mnt/system/config/ dump=/mnt/dump/ FTP'ing using the below code:- $ftp = Net::FTP->new("10.69.11.65", Debug => 0) or die "Cannot connect to the target: $@"; $ftp->login("user","user") or die "Cannot login ", $ftp->message; $ftp->binary(); $ftp->cwd("/mnt/micro/config") or die "Cannot change working directory ", $ftp->message; $ftp->put("micro/config", "config") or die "put failed ", $ftp->message; $ftp->quit();
In reply to New line problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |