in reply to A string that begins whit $
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.#!/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,';
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|