Re: split question
From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 08/24/04
- Next message: Rafal Konopka: "Re: split question"
- Previous message: Uri Guttman: "Re: convertinga directory path into a hash"
- In reply to: Tore Aursand: "Re: split question"
- Next in thread: A. Sinan Unur: "Re: split question"
- Reply: A. Sinan Unur: "Re: split question"
- Reply: Tore Aursand: "Re: split question"
- Reply: David K. Wall: "Re: split question"
- Reply: ctcgag_at_hotmail.com: "Re: split question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Aug 2004 15:58:43 +0200
Tore Aursand wrote:
>
> Untested:
>
> #!/usr/bin/perl
> #
> use strict;
> use warnings;
> use Data::Dumper;
>
> my $string = 'abc def ghi jkl';
> my @parts = split( /\s+/, $string, 2 );
>
> print Dumper( \@parts );
Why on earth do you use Data::Dumper to print a two elements array?
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
- Next message: Rafal Konopka: "Re: split question"
- Previous message: Uri Guttman: "Re: convertinga directory path into a hash"
- In reply to: Tore Aursand: "Re: split question"
- Next in thread: A. Sinan Unur: "Re: split question"
- Reply: A. Sinan Unur: "Re: split question"
- Reply: Tore Aursand: "Re: split question"
- Reply: David K. Wall: "Re: split question"
- Reply: ctcgag_at_hotmail.com: "Re: split question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|