in reply to where is /\d+$/ result??

As this shows, $+ is the position of the match, not the value of the match. You need to use parentheses to indicate what you want to preserve, with $1 indicating the value of the first match. So your code should look like:
if ($frameDesc =~ /(\d+)$/ ) { print FH "FTP $1\n"; } else { print FH "FTP 0\n"; }
Or, if you were interested in Perl Golf, you might try
my $value = ($frameDesc =~ /(\d+)$/ ) ? $1 : 0; print FH "FTP $value\n";

If you had two sets of parentheses in your regex and you wanted to manipulate the second value, you'd specify $2, etc.

Warning: the code is untested.

Replies are listed 'Best First'.
Re^2: where is /\d+$/ result??
by ww (Archbishop) on May 04, 2008 at 03:17 UTC

    See: Mastering Regular Expressions, 2nd ed., ISBN: 0-596-00289-0, Friedl, pp300-301.

    "$+   This is a copy of the highest numbered $1, $2, etc. explicitly set during the match."

    The "this" (perlvar) you cite phrases it this way:

    "$+
    The text matched by the last bracket of the last successful search pattern. This is useful if you don't know which one of a set of alternative patterns matched."

    Whereas perldoc perlretut states this re @+ and @-:

    In addition to what was matched, Perl 5.6.0 also provides the positions of what was matched with the "@-" and "@+" arrays.
Re^2: where is /\d+$/ result??
by ikegami (Patriarch) on May 04, 2008 at 01:38 UTC

    As [perlvar] shows, $+ is the position of the match, not the value of the match.

    You appear to be confusing $+ with @+.