I'm trying to use backticks to run ls to search for files to gather a list of files that exist. End goal is to parse a group of iTune's playlist files to make sure when import the playlists to itunes it won't drop files if they don't exist. My problem is when I run ls in backticks with the file name, a \r is post pended to the command. making every file show up as not found.
$playListRow = quotemeta($playListRow); my $lscom = "ls $playListRow 2>&1"; my $result = `$lscom`;
this outputs: ls: /Volumes/public_files/music/ABC - The Lexicon of Love (1982) {1996 Remaster} V0what.cd/16 Look Of Love (Live).mp3\r: No such file or directory
No matter how I fiddle with it I can't get the \r to go away. Thanks!
In reply to backtick iterpolation issue by idlehands
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |