in reply to Making a title
split uses a regex to split apart a string. Within that regex we have a character class. The character class basically means it will use any one of the things in there to split on.# get into the habit of using these. # they will save you a lot of headaches. use strict; use warnings; my $title = "/Text_Files/Cake_Rec.txt"; my @tokens = split /[\/_\.]/, $title; foreach (@tokens) { print "$_\n"; }
You should probably also read perlre. There's a lot of great info on how regex's work.
Hope this helps
Rich
|
|---|