Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • my @tokens = m/(\"[\s\S]+\"|\S+)/g;

    Shouldn't that regex be m/(\"[^"]+\"|\S+)/g ? Or as I'd normally write it, /("[^"]+"|\S+)/g . The string might include two quoted phrases.

    • thats a very good point.

      The second regex would do very nicely

      --

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;