in reply to Re^2: Using the second word in a line to split a file into multiple files
in thread Using the second word in a line to split a file into multiple files
Please use <code> tags to format your code and sample input and output.
I have .s in the second word, and that second word always ends with a dot.
Now might be a good time to look at perlretut, as jcb suggested, or perhaps perlrequick. The \w+ will only match Word characters (normally [a-zA-Z0-9_] plus Unicode "Word" characters), but not including the dot. Perhaps you want to say "word characters plus dot", i.e. [\w.]+, or simply "any non-whitespace characters", i.e. \S+.
Update: Edited first sentence that was accidentally cut off.
|
|---|