If you are trying to find the package a global variable came from, I do not think that an SV stores that information. Actually, it cannot store that information, since the same SV can be aliased from multiple packages, as Exporter does. You probably want the GV (corresponding to the typglob *VAR) instead of an SV (corresponding to the scalar $VAR).

And I see a few English mistakes, so I will point them out to help you learn as you have asked:

"how get stash name" in subject
You need the infinitive verb form here: "how to get stash name".
"a SV"
If "SV" is pronounced "ess-vee", then you should write "an SV" rather than "a SV" — the rule in English is to use "a" if the following phoneme is a consonant and "an" if the following phoneme is a vowel. (Yes, acronyms and abbreviations can "make hash" of this at times: "an SV" but "a Scalar Value" if you expand the abbreviation as you read it.)
"my below code always crash"
The most important part here is the verb number: "code" is singular, so "crash" should be "crashes". (Yes, many English verbs require essentially the same suffix used for plural nouns if the subject of the sentence is a singular noun.) The word order is also "odd", although understandable; in normal English this should be written as "my code below always crashes", "the code below always crashes", or perhaps "the following code always crashes". Note that there is also a certain "distance" in the later examples — you wrote the code, but the code is to some extent independent of its author — especially when it does not work! :-)
"Thank in advance!"
Verb number again — this should be "Thanks in advance!"


In reply to Re: how get stash name of SV? by jcb
in thread how to get stash name of SV? by xiaoyafeng

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.