No! this did not change the behavior.

perdeep

-----Original Message-----
From: Trevor Joerges [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 30, 2002 3:55 PM
To: Mehta, Perdeep; [EMAIL PROTECTED]
Subject: Re: [Perl-unix-users] Perl help


Your printing to a filehandle OUT. What do you need the greater than symbol
before the $string for? If you are trying to print a literal greater than
string you will need to escape it "\> $string\n" otherwise just print
"$string\n".

Hope this helps.

Trevor Joerges
SendMIME Software
www.sendmime.com


----- Original Message -----
From: "Mehta, Perdeep" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 30, 2002 4:30 PM
Subject: [Perl-unix-users] Perl help


| Hi All,
|
| I would appreciate any help on the following code.
|
| Here I fill the defln hash with the appropriate keys and values:
|
| use strict;
| use warnings;
|
|   my %defln = ();
|
|   while (my $line = <FILE>) {
|        chop($line);
|        if ($line =~ /^$/) {
|           next;
|        }
|        else {
|           my @words = split(/\t+/, $line);
|           push(@{ $defln{$words[0]} }, $line);
|        }
|    }
|
|
| Then I wish to retrieve the value associated with a key and work on it,
|
|      my($defln) = @{ $defln{$words[0]} };
|      my($string) = ($defln =~ /\s*\|([^|]+)\|/g);  # string between two
| pipes
|      print OUT "> $string\n";
|
| Though the result is printed out but it throws following error that I
could
| not resolve,
|
| Use of uninitialized value in concatenation (.) or string at test.pl line
| 103, <FILE> line 1895.
| The line 103 points to the print statement.
|
| Thanks in advance,
| perdeep
| _______________________________________________
| Perl-Unix-Users mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to