my $string = 'pgrap.C4A2S1R.1.gif'; my @s = ($string =~ /(?:\.)*(\w+)(?:\.)*/g);
the arraytores the elements the //g makes it find more than one match ... post again if you need more explanation ... hth On Tue, Oct 23, 2001 at 06:20:31AM -0500, Jerry Preston shaped the electrons to read: > Hi, > > I want to break down this name, pgrap.C4A2S1R.1.gif, into 4 parts. I > can do it with split: > > ( $a1,$a2,$a3,$a4 ) = split( /\./, $program ); > > How do I do it with s/\b(\.)\b(\.)\b(\.)\b(\.)/? > > Thanks, > > Jerry > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]