in reply to A string that begins whit $

Try escaping the dollar sign. You're probably having an issue with Perl interpreting $GPGLL as a scalar. Since it's undefined, you have a problem. Also, make sure you turn on warnings and strict. That will catch problems like that.
#!/usr/bin/perl -w use strict; my $var = "$GPGLL,577.015,N,01201.076,E,"; #wrong! or my $var = "\$GPGLL,577.015,N,01201.076,E,"; #better. Note the escape. or my $var = '$GPGLL,577.015,N,01201.076,E,';
In the final example, single quotes are used. Double quotes around a string allow for variable interpolation. Single quotes prevent that. There are a variety of ways that your code could have issues with interpolation. If you post a small snippet, we can take a look and figure out exactly how it is occurring.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.