in reply to Re^2: Most efficient way to remove some text from a string
in thread Most efficient way to remove some text from a string
This prints only the artist, album or track name
poj#!perl use strict; #my $infile = '/home/zzz/Desktop/Scripting/usb/musicLibrary.txt'; #open IN,'<',$infile or die "Could not open $infile $!"; #while (<IN>){ while (<DATA>){ chomp; my @f = split '/',$_; my $tab = ' ' x (@f-6); print $tab.$f[-1]."\n"; } __DATA__ /Volumes/WD/Not Migrating/Music/Ana Tijoux /Volumes/WD/Not Migrating/Music/Ana Tijoux/Luchin /Volumes/WD/Not Migrating/Music/Ana Tijoux/Luchin/Luchin.m4a /Volumes/WD/Not Migrating/Music/Ana Tijoux/Kaos/ /Volumes/WD/Not Migrating/Music/Ana Tijoux/Kaos/Intro.m4a /Volumes/WD/Not Migrating/Music/Ana Tijoux/Kaos/Gol.m4a /Volumes/WD/Not Migrating/Music/Ana Tijoux/Kaos/Despabílate.m4a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Most efficient way to remove some text from a string
by adamZ88 (Beadle) on Dec 07, 2016 at 01:51 UTC | |
by hippo (Archbishop) on Dec 07, 2016 at 09:57 UTC | |
by adamZ88 (Beadle) on Dec 07, 2016 at 19:18 UTC | |
by poj (Abbot) on Dec 07, 2016 at 20:56 UTC | |
by adamZ88 (Beadle) on Dec 09, 2016 at 22:04 UTC |