I ran in following error message:

Use of uninitialized value in print at versuch.pl line 275, <GEN2> line 5

This message is generated by a print of a variable assigned a couple of lines above. It seems to me that no more variables could be assigned. What happend ?? (: ChFa
#------- Standard Bibliotheken --------------- use FileHandle; use FindBin; use lib $FindBin::Bin; use lib "$FindBin::Bin/../lib"; #-------- Pfade ----------------------------- #--- Programm: my $BIN_PATH = $FindBin::Bin; my $ROOT_PATH = $BIN_PATH; $ROOT_PATH =~ s/bin//; my $LOG_PATH = $ROOT_PATH . "log/"; my $LIB_PATH = $ROOT_PATH . "lib/"; my $TMP_PATH = $ROOT_PATH . "tmp/"; #------- Programm Bibliotheken ------------ use dump_paras; ... read_file( $DumpFile); #-- sub read_file { #------ Eingabe my $FileName = shift; #------ Rueckgabe my ( %GeneralInfo, %InterfaceInfo ); #------ Konstanten --------- my $INPUT = new FileHandle; my $NotNamed = "n.n."; #------ Variablen my ( $SNMP_Support,$IF_Nr, $OID_ref, $OidEnterpriseMatch); #------ Fehlerbehandlung my $Success = 0; #------ Bearbeitung open $INPUT, $FileName or die $!; while( <$INPUT> ) { my $IfDescDesc= $Interface[$i_iide]; /^($Ref2General->[$i_ghos])/ and do { chomp(); .....(some filtering stuff) /^($Ref2General->[$i_goid])/i and do { my $Key; my $Unkown = "Unkown"; # <--- Assignment 4 LINE 275 $OidEnterpriseMatch = $FALSE; chomp(); s/^($Ref2General->[$i_goid]:\s*)//; /^($StartOfOID)/ and do { s/(.\d.)(\d*)$//; print $Unknown, "\n"; # <---- LINE 275!! $GeneralInfo{$Ref2General->[$i_goid]}=$2; ..the Module normaly used 4 assignment: package dump_paras; use Exporter; @ISA = qw(Exporter); @EXPORT = qw( $i_ghos $i_gsta $i_gdes $i_gloc $i_gsnm $i_gnov $i_gn +oa $i_gnoi $i_goid $i_iina $i_iide $i_ista $i_iipa $i_ii +pm $i_iinu $i_iity $i_iist $Ref2General $Ref2Interface $Ref2Networkers $Ref2NetworkersOID $DumpFileName $Nod +es $NO $StartOfOID $Unknown );
(:

Edited by Chady -- added code tags.


In reply to Restricted assignment by o_chfa

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.