A question was implied. Here's the relevant code, which I didn't post before because I doubt it'll help. I was hoping that someone had already encountered this trouble, which I suspect has something to do with Win32::SerialPort.
# First call this sub. sub connectToGPS { my $gps; if ($winMain->rbNMEA->Checked()) { $gps = new GPS::NMEA(Port => $winMain->cbGPSPort->Text(), Baud => $winMain->cbPortBaud->Text()); } else { $gps = new GPS::Garmin(Port => $winMain->cbGPSPort->Text(), Baud => $winMain->cbPortBaud->Text()); } return $gps; } # Then pass its returned value to this sub. sub getGPSData { my $gps = shift; my %gpsHash = %{$gps}; my $port = $gpsHash{serial}; $port->purge_all(); $port->stty_kill("\cU"); my ($time, $satsUsed, $accuracy, $quality, $speed); if ($winMain->rbNMEA->Checked()) { $gps->parse(); my %gpsData = %{$gps->{NMEADATA}}; $time = $gpsData{time_utc}; $time = "---" unless $time; $satsUsed = $gpsData{num_sat_tracked}; $satsUsed = "---" unless $satsUsed; $satsUsed = 0 if $satsUsed eq "00"; $accuracy = $gpsData{data_valid}; $accuracy = "---" unless $accuracy; $quality = $gpsData{fixq012}; $quality = "---" unless $quality; $speed = $gpsData{speed_over_ground}; $speed = "---" unless $speed; $speed = "---" if $speed eq ""; } else { my ($sec, $min, $hour, $mday, $mon, $year) = $gps->get_time(); $time = "$hour:$min:$sec"; $time = "---" if $time eq "::"; } my ($latitudeSign, $latitude, $longitudeSign, $longitude) = $gps-> +get_position(); $port->close(); # Irrelevant GUI update code goes here. }

In reply to Re^2: GPS capture blows away subsequent backtick command by JustMu
in thread GPS capture blows away subsequent backtick command by JustMu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.