#!/usr/bin/perl use Data::Dumper; my $foo = 'one#two#three!four#five#six';my @parts = split /#|(?=!)|(?<=!)/, $foo;print Data::Dumper->Dump(\@parts);
Standard input is empty
$VAR1 = 'one'; $VAR2 = 'two'; $VAR3 = 'three'; $VAR4 = '!'; $VAR5 = 'four'; $VAR6 = 'five'; $VAR7 = 'six';
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!