in reply to split a string at a defined index

You don't always have to use a regex (in split or otherwise). :-)
#! /usr/bin/perl use strict; use warnings; my $line = q{www,google,yahoo,345}; my $comma = rindex($line, q{,}); print substr($line, 0, $comma), qq{\n}; print substr($line, $comma+1);