On Friday, June 7, 2002, at 07:57 , Eduardo Cancino wrote:
> Hi. > > I'm parsing a text file with this estrcuture line: > > 'here is a quote'. Autor (birth year - death year); occupation > nationality. > > ====== > > I need to separate from the beggining to the first dot, ignoring the dots > in > side the two ''. > > but i have tried to escape the ' (\'), but no use, what i'm missing or > what > should i read. how about this: my $derQuote; #hereDoc great for nesting stuff my $line =<<derLine; 'here is a quote'. Autor (birth year - death year); occupation nationality. derLine chomp($line); #decruft der line ($derQuote, $derOther) = ($1, $2) if( $line =~ /'(.*)'\.(.*)/) ; print "derQuote we find is:$derQuote:\n" print "Undt der Rest of it all:$derOther:\n:$line:\n"; The Round Braces capture what you want into the $1 and $2 - you only need to 'guard' when looking for things like "." in your regEx that you wish to use as delimiting elements. cf perldoc perlre ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]