[22015] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4237 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 9 18:05:53 2002

Date: Mon, 9 Dec 2002 15:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 9 Dec 2002     Volume: 10 Number: 4237

Today's topics:
    Re: BEGIN block and $:: variables (Mark Jason Dominus)
    Re: can't display HTML file in browser <perl-dvd@ldschat.com>
    Re: can't display HTML file in browser <dave@dave.org.uk>
    Re: can't display HTML file in browser (Tad McClellan)
        Determining If a Socket is Open... <brad.galiette@snet.net>
        Filenames on Win32: the bane of my existence.... (drsmith)
    Re: Getting a script to run properly <lou.moran@gellerandwind.com>
    Re: hashed filehandles? <dave@dave.org.uk>
        Help with Schedule::Cron (Phil Brodd)
    Re: Output Lines of 70 Characters (David Tian)
    Re: Output Lines of 70 Characters <mjcarman@mchsi.com>
    Re: Output Lines of 70 Characters (Tad McClellan)
    Re: Output Lines of 70 Characters (Jay Tilton)
        parsing an xml file using perl (urgent please .. i want (reddy)
    Re: parsing an xml file using perl (urgent please .. i  <perl-dvd@ldschat.com>
    Re: parsing an xml file using perl (urgent please .. i  <dave@dave.org.uk>
    Re: parsing an xml file using perl (urgent please .. i  (Tad McClellan)
    Re: parsing an xml file using perl (urgent please .. i  (Tad McClellan)
    Re: which UI for Perl? PerlQt Strongly recommended <scriptyrich@yahoo.co.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 9 Dec 2002 22:22:46 +0000 (UTC)
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: BEGIN block and $:: variables
Message-Id: <at353m$n31$1@plover.com>

[Mailed and posted]

In article <arihui$h2j$1@pheidippides.axion.bt.co.uk>,
Kevin Brownhill <kevinbrownhill@yahoo.com> wrote:
>Thanks, that explains it.
>
>Does the $::pi package variable need to be declared anywhere with my ?

Package variables can't be declared with 'my'; 'my' only declares
lexical variables.

See

        http://perl.plover.com/FAQs/Namespace.html



------------------------------

Date: Mon, 9 Dec 2002 12:17:15 -0700
From: "David" <perl-dvd@ldschat.com>
Subject: Re: can't display HTML file in browser
Message-Id: <VT5J9.5822$K5.4522@fe01>

<PERLProgrammer@nowhere.com> wrote in message
news:at2ovr$uct$1@news.netmar.com...
> My PERL script creates several HTML files (in the same directory), but
when I
> try to display any of them in a browser, I get an 'HTTP 500 Internal
server
> error' message. Any ideas as to why this is happening?

You probably are lacking the Content-Type or you have a bug in your perl
script.  try running it on the command line.  If it prints out the html
just fine on the command line, you might try putting something like this
near the top of your perl script:

print "Content-Type: text/html\n\n";

Regards,
David





------------------------------

Date: Mon, 09 Dec 2002 19:22:31 +0000
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: can't display HTML file in browser
Message-Id: <pan.2002.12.09.19.22.30.739554@dave.org.uk>

On Mon, 09 Dec 2002 18:55:55 +0000, PERLProgramme wrote:

> My PERL script creates several HTML files (in the same directory), but when I
> try to display any of them in a browser, I get an 'HTTP 500 Internal server
> error' message. Any ideas as to why this is happening?

1/ It's "Perl" not "PERL".

2/ This is a CGI question and therefore is off-topic for this group.

3/ Have you tried looking in the web server error log?

Dave...

-- 
  Two slightly distorted guitars



------------------------------

Date: Mon, 9 Dec 2002 16:43:19 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: can't display HTML file in browser
Message-Id: <slrnava747.26t.tadmc@magna.augustmail.com>

PERLProgrammer@nowhere.com <PERLProgrammer@nowhere.com> wrote:

> My PERL script 


You should learn how to spell the name of the language that you are using.


> I get an 'HTTP 500 Internal server
> error' message.


That is message from your web server, it is not a Perl message.


   perldoc -q 500

      "My CGI script runs from the command line but not the
       browser.  (500 Server Error)"

You are expected to check the Perl FAQs *before* posting to
the Perl newsgroup.


>  Free (anonymous) Usenet News via the Web


Time for a new scorefile entry...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 09 Dec 2002 20:55:48 GMT
From: "Brad W. Galiette" <brad.galiette@snet.net>
Subject: Determining If a Socket is Open...
Message-Id: <or7J9.3229$p26.853593109@newssvr10.news.prodigy.com>

How would one go about determining if a client is still active on a
server-based socket? (i.e., does the socket remain open and is there a
computer at the other end? :-)

Brad





------------------------------

Date: 9 Dec 2002 12:55:29 -0800
From: drsmithhm@hotmail.com (drsmith)
Subject: Filenames on Win32: the bane of my existence....
Message-Id: <c7c208d1.0212091255.6b0849cb@posting.google.com>

 ... at the moment anyway.

I've got a fileserver(running Win2k) that is regularly accessed by
both Macintosh and Windows PC's of all flavors.  I'm trying to write a
perl script to do some general cleanup like removing old temp files,
etc.

The problem is that many of the filenames contain dates, spaces, and
other special characters like umlat's.  Perl's readdir function is
returning '?' characters in place of the special characters which
later on causes unlink() to fail.

I've been through faq's, mailing lists, and just about every other
resource I can find to get this to work with no luck.  I sometimes see
reference to codepage's being the cause of the issue, but no
solutions.  What's even more frustrating is that I can't possibly be
the first person to have run into this kind of problem.

Anyone got any ideas?  Code samples to share?  My sanity would greatly
appreciate it at this point.

--drsmith

ps - I'm running the latest 5.6 build from ActiveState.


------------------------------

Date: Mon, 09 Dec 2002 16:51:21 -0500
From: Lou Moran <lou.moran@gellerandwind.com>
Subject: Re: Getting a script to run properly
Message-Id: <9su9vusvqo7qie98d46dlfgg1i2cki6ddv@4ax.com>

On Fri, 06 Dec 2002 15:09:37 -0500, Lou Moran
<lou.moran@gellerandwind.com> wrote:

>
>Perhaps I have been up too long or something...
>
>But I can't seem to get this script to run any way except:
>
>$ perl uptime.pl
>
>barney ellem ~/code $ sudo chmod -X uptime.pl
SNIP
>barney ellem ~/code $ sudo chmod -x uptime.pl
SNIP
>What have I forgotten to do?  Where's that confunded bridge?

PS I am an idiot

Should be:

>barney ellem ~/code $ sudo chmod +x uptime.pl

--
There's more than one way to do it, but only some of them work


------------------------------

Date: Mon, 09 Dec 2002 19:21:22 +0000
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: hashed filehandles?
Message-Id: <pan.2002.12.09.19.21.21.445324@dave.org.uk>

On Mon, 09 Dec 2002 19:12:48 +0100, HEISERER DANIEL wrote:

> Hi,
> 
> I try to write to a filehandle which is a hash
> 
> foreach $t(keys %M){
> open($op{$t},">file.$t");
> }
> foreach $t(keys %M){
> 	printf $op{$t} "hello mr %s \n",$M{$t};
> }
> 
> Obviously this does not work because perl is unable to use this hash
> approach for filehandles.
> 
> How can I achieve that or something like that?
> I absolutely hate to loop around with if-loops

Modern versions of Perl handle that with only the smallest of changes.

#! /usr/bin/perl

use warnings;
use strict;

my %M = (1 => 'one', 2 => 'two');
my %op;

foreach my $t (keys %M){
  open($op{$t}, ">file.$t");
}
foreach my $t (keys %M){
  printf {$op{$t}} "hello mr %s \n", $M{$t};
}


hth,

Dave...

-- 
  "Don't you boys know any _nice_ songs?"



------------------------------

Date: 9 Dec 2002 11:55:35 -0800
From: pheelb@yahoo.com (Phil Brodd)
Subject: Help with Schedule::Cron
Message-Id: <69cfe521.0212091155.365ad8bc@posting.google.com>

I'm hoping someone with experience using this module can show me where
I've screwed up in the code below.  The first call to add_entry is
successful and calls the update_schedule subroutine at the correct
time.  That sub is supposed to call add_entry for each row it gets
from the database.  When an entry's time comes, it should call the
collect routine.  collect never seems to get called, however.  Can
anyone see why?

Thanks.

Phil


[ start file scheduler.pl ]

#!/usr/pkg/bin/perl

use strict;
use Schedule::Cron;
use Collector;
use DBI;


## Create a new object with default subroutine
my $cron = new Schedule::Cron( \&collect );

## Install the updater
$cron->add_entry( "* 2 * * *", \&update_schedule );

## Run scheduler
$cron->run( detach => 1, pid_file => 'scheduler.pid' );


## ==================================================================
#
# collect - 
#
## ==================================================================
sub collect {		
	 my ( $class_name, $program_id, $url_args ) = @_;
	
  # do stuff here
	
}


## =================================================================
#
# update_schedule - adds timetable entries for rows recently added to 
#                                    the collector table. 
#
## =================================================================
sub update_schedule {
	my $dbh = DBI->connect( 'DBI:mydb', 'user', 'pass' );

	my $sql = qq(
		SELECT 
			id, program_id, class_name, time_spec, url_args 
		FROM
			collector
	);
	
	my $sth = $dbh->prepare( $sql );
	$sth->execute;
	
	my ( $id, $program_id, $class_name, $time_spec, $url_args );

	$sth->bind_columns( \$id, \$program_id, \$class_name, \$time_spec,
\$url_args );

	while ( $sth->fetch ) {
		## add timetable entries for new or unregistered collectors
		$cron->add_entry( $time_spec, 
		                  $id => $class_name, $program_id, $url_args );
			unless $cron->check_entry( $id );	
	}

	$dbh->disconnect;
}

[ end file scheduler.pl ]


------------------------------

Date: 9 Dec 2002 11:30:41 -0800
From: yuanxi80@hotmail.com (David Tian)
Subject: Re: Output Lines of 70 Characters
Message-Id: <da930649.0212091130.5191c6ea@posting.google.com>

"J rgen Exner" <jurgenex@hotmail.com> wrote in message news:<KTWI9.594$K03.22@nwrddc01.gnilink.net>...
> David Tian wrote:
> > The program should output lines of 70 characters on standard output,
> > so that:
> > each line should start with the beginning of a word (no word splits
> > across lines);
> 
> Have you tried Text::Wrap?
> 
> jue

I know Text::Wrap, but I have to write my own program to do this task.

David


------------------------------

Date: Mon, 09 Dec 2002 13:44:57 -0600
From: Michael Carman <mjcarman@mchsi.com>
Subject: Re: Output Lines of 70 Characters
Message-Id: <at2rrq$58o3@onews.collins.rockwell.com>

On 12/9/02 1:30 PM, David Tian wrote:
> "J rgen Exner" <jurgenex@hotmail.com> wrote:
>> David Tian wrote:
>>> The program should output lines of 70 characters on standard output,
>>> so that: each line should start with the beginning of a word (no 
>>> word splits across lines);
>> 
>> Have you tried Text::Wrap?
> 
> I know Text::Wrap, but I have to write my own program to do this task.

So it's a homework assignment. In that case, you should do it yourself.
 What makes you think your teacher doesn't read this ng?

-mjc



------------------------------

Date: Mon, 9 Dec 2002 16:36:02 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Output Lines of 70 Characters
Message-Id: <slrnava6mi.26t.tadmc@magna.augustmail.com>

David Tian <yuanxi80@hotmail.com> wrote:
> "J rgen Exner" <jurgenex@hotmail.com> wrote in message news:<KTWI9.594$K03.22@nwrddc01.gnilink.net>...
>> David Tian wrote:

>> > The program should output lines of 70 characters on standard output,

>> Have you tried Text::Wrap?

> I know Text::Wrap, but I have to write my own program to do this task.


Why do you have to write your own program to do this task?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 09 Dec 2002 22:58:33 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Output Lines of 70 Characters
Message-Id: <3df50491.249511633@news.erols.com>

yuanxi80@hotmail.com (David Tian) wrote:

: I am writing a Perl program. Given an input of some lines of text as a
: string with no newline chars, where each line contains some
: combination of:
:  alphabetic symbols, either upper case or lower case
:  punctuation symbols: '.' ',' ';' ':' '!' '?'
:  spaces
: 
: The program should output lines of 70 characters on standard output,
: so that:
: each line should start with the beginning of a word (no word splits
: across lines);
: Each line contain as many words as possible within limits.
: The lines are left aligned.
: 
: My program is as follows, but it doesn't do any substitutions, so the
: input texts are unchanged:

The article's poor word-wrapping has rendered the program incoherent, so a
debug is right out.  You'll have to be satisfied with general pointers.

: &lines_of_70($input_lines,$leng_input,68,$leng_input);

Do you know what effects the "&foo()" form of subroutine call has?
Do you need those effects?

Stick with the plain "foo()" form of call unless the answer to both
questions is "yes."

:      $_ = substr($input_lines,$index,1);#get the 70th char in string
:       if($_ =~/(\s)/){print"case1\n";   #case1:70th char is a space.
:       s/$1/\n/;  #replace space with a newline.

The program does this is many places.

    $_ = 'some string';
    $_ =~ /some regex/;

Cut out the assignment to $_ (not even a localized $_, at that) and bind
the operator directly to the string, e.g.

    'some string' =~ /some regex/;

As well, the program does this in many places.

    if( /(some regex)/ ) { 
        s/$1/some string/;
        # do some other stuff
    }

That's kind of idiom is just weird, and is loaded with gotchas that are
easily avoided by using the s/// as the condition, e.g.

    if( s/some regex/some string/ ) { 
        # do some other stuff
    }

: $no_of_chars_left = $length_input - ($index+1); #find the no. of chars left.
                      ^^^^^^^^^^^^^
Where did $length_input come from?
Everywhere else in the program, its name is $leng_input .
"use strict;" or "use warnings;" would have caught that instantly.

: &lines_of_70($input_lines,$leng_input,$index+69,&no_of_chars_left);
                                                  ^^^^^^^^^^^^^^^^^
Is there really a sub with that name?
More likely you meant $no_of_chars_left .

: elsif($'=~ /^(\s)/){ #print"case 3\n"; #if the char to its right
        ^^
Where is $' getting its value?
To reach this point in the if/elsif structure, there cannot have been a
successful match yet.  If you're developing with warnings enabled, I would
expect to see the screen fill with "Use of uninitialized value" warnings.

If you're developing without warnings, you must have a lot of extra feet
and a lot of bullets to put into them.

On the whole, the program gives an impression of clumsiness.  It's not
irreparably awful, but neither is it charming.

You've got a grasp on the basic algorithm, but you're putting too much
effort into micro-managing every possible detail of substring and
character position.  The program chooses a recursive solution when a
simple while(){...} loop would do.  It does a lot of unnecessary
match-capturing, but schizophrenically uses $`, $&, $' as well.

Simplify, hepcat.

    print "$_\n" for lines_of_70($input_lines);
    sub lines_of_70 {
        my($arg) = @_;
        my @ret;
        local $_;
        while( $_ = substr($arg, 0, 70) ) {
            chop until /[ ,.;:?!]$/;
            substr($arg, 0, length, '');
            s/\s+$//;
            push @ret, $_;
        }
        return @ret;
    }
    # Copyright 2002, Jay Tilton.
    # Pasting this code into homework assignments
    # is expressly forbidden.



------------------------------

Date: 9 Dec 2002 11:22:10 -0800
From: vanikandoori@yahoo.com (reddy)
Subject: parsing an xml file using perl (urgent please .. i want an answer soon)
Message-Id: <6cd469c.0212091122.3b46ed9c@posting.google.com>

iam trying to creat an xml file and then parse it using perl. but iam
getting the wrong data. can anyone please help out. The code is this
#!/usr/bin/perl -w
use XML::Parser;
open (FILE, ">$dir/file$num.xml") or die "Can't open $dir/file$num.xml
Reason: $!";
my $file = "num.xml";
#my $xmlheader = "<?xml version="1.0"?>";
my $starttag = "<email_body>";
my $endtag = "</email_body>";
$data_file="body.txt";
open(DAT, $data_file) || die("Could not open file!");
@raw_data=<DAT>;
close(DAT);
open(DAT,">$file") || die("Could not open file!");
print DAT "$starttag@raw_data$endtag"; 
close(DAT);

# initialize the parser
my $parser = XML::Parser->new( Handlers => 
{                                
Char  => \&char_handler      });
$parser->parsefile($file);
sub char_handler
 {
     my ($p, $data) = @_;
     #$data =~ s/\n|\t//g;
     #print "$data \n";
     push( @data_stack, { data=>$data });
   
 }
 foreach my $d (@data_stack){
push(@stackdata,"$$d{ data }");
}
for($i=0;$i<@stackdata;$i++) {
print "$stackdata[$i]";
}
my $dchildof = $stackdata[0];
my $dcontact = $stackdata[1];
my $dpolicy = $stackdata[2];
my $dassignedto = $stackdata[3];
my $dproblem = $stackdata[4];
my $dsummary = $stackdata[5];
print " ------------------\n";
print "child_of: $dchildof\n";
print "contact : $dcontact\n";
print "policy: $dpolicy\n";
print "assigned_to: $dassignedto\n";
print "problem: $dproblem\n";
print "summary: $dsummary\n";
 The out put that iam getting is :
Name "main::FILE" used only once: possible typo at temp.pl line 3.
Use of uninitialized value in concatenation (.) or string at temp.pl
line 3.
Use of uninitialized value in concatenation (.) or string at temp.pl
line 3.
  9831
  Yamaha
   Marketing
  Enricot
    Question for 9831 ADIP decoder
  Can we get  ADIP sync and wobble PLL with 9831 AB? This is for
spindle CLV con
trol
 ------------------
child_of:   9831
contact :
policy:

assigned_to:
problem:  Yamaha
summary:

actually when i try to print the array with a for loop iam getting it
right but when i take each element of the aray and put that in a
separat variable and try to print that then i get it wrong. for
example...
I should get the out put like this 
 9831
  Yamaha
   Marketing
  Enricot
    Question for 9831 ADIP decoder
  Can we get  ADIP sync and wobble PLL with 9831 AB? This is for
spindle CLV con
trol
 ------------------
child_of:   9831
contact : Yamaha
policy:   Marketing
assigned_to:  Enricot
problem:  Question for 9831 ADIP decoder
summary:Can we get  ADIP sync and wobble PLL with 9831 AB? This is for
spindle CLV control
but iam not getting it like that .. as i said above( i copied the out
put i got above).

The body.txt file tha iam using is this 
<Child_of>  9831           </Child_of >      
<Contact> Yamaha        </Contact>
<Policy>  Marketing   </Policy >
<Assigned_to> Enricot    </Assigned_to>
<Problem>   Question for 9831 ADIP decoder  </Problem>
<Problem_Summary> Can we get  ADIP sync and wobble PLL with 9831 AB?
This is for spindle CLV control  </Problem_Summary>

Can anyone please solve this problem.. Its urgent.. i want an answer
soon please....
Thank you


------------------------------

Date: Mon, 9 Dec 2002 14:47:23 -0700
From: "David" <perl-dvd@ldschat.com>
Subject: Re: parsing an xml file using perl (urgent please .. i want an answer soon)
Message-Id: <%58J9.5880$K5.1832@fe01>

"reddy" <vanikandoori@yahoo.com> wrote in message
news:6cd469c.0212091122.3b46ed9c@posting.google.com...
> iam trying to creat an xml file and then parse it using perl. but iam
> getting the wrong data. can anyone please help out.

Reddy,
    You should probably try using an existing xml parser.  You should
find them here:

http://search.cpan.org/search?query=xml&mode=all


Regards,
David





------------------------------

Date: Mon, 09 Dec 2002 22:02:23 +0000
From: "Dave Cross" <dave@dave.org.uk>
Subject: Re: parsing an xml file using perl (urgent please .. i want an answer soon)
Message-Id: <pan.2002.12.09.22.02.22.406145@dave.org.uk>

On Mon, 09 Dec 2002 11:22:10 +0000, reddy wrote:

>  The out put that iam getting is :
> Name "main::FILE" used only once: possible typo at temp.pl line 3.

This is because you're opening the filehandle FILE, but then never doing
anything with it.

> Use of uninitialized value in concatenation (.) or string at temp.pl
> line 3.
> Use of uninitialized value in concatenation (.) or string at temp.pl
> line 3.

These are because you are using the variables $dir and $num on line 3.
Neither of them have a value at this point. Adding "use strict" to your
program would help you find errors like this.


>  ------------------
> child_of:   9831
> contact :
> policy:
> 
> assigned_to:
> problem:  Yamaha
> summary:

[ snip ]

> I should get the out put like this 

[ snip ]

>  ------------------
> child_of:   9831
> contact : Yamaha
> policy:   Marketing
> assigned_to:  Enricot
> problem:  Question for 9831 ADIP decoder
> summary:Can we get  ADIP sync and wobble PLL with 9831 AB? This is for
> spindle CLV control

There are more elements in your @data_stack than you think there are. The
Char handler is called _every_ time a sequence of text is found in your
XML document. This includes white space and line feeds.

hth,

Dave...

-- 
  ...she opened strange doors that we'd never close again



------------------------------

Date: Mon, 9 Dec 2002 16:22:04 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: parsing an xml file using perl (urgent please .. i want an answer soon)
Message-Id: <slrnava5sb.26t.tadmc@magna.augustmail.com>

reddy <vanikandoori@yahoo.com> wrote:

> Can anyone please solve this problem.. 


Sure, I can solve your problem.


> Its urgent..


(why does your period key skip like that?)



Since you have marked it as "urgent", it is probably too late,
so I won't bother answering it.

If it hadn't been marked as urgent, then I would have answered it.

Marking a Usenet post as urgent is an effective way of having
your article ignored, you shouldn't do that.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 9 Dec 2002 16:34:18 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: parsing an xml file using perl (urgent please .. i want an answer soon)
Message-Id: <slrnava6ja.26t.tadmc@magna.augustmail.com>

reddy <vanikandoori@yahoo.com> wrote:

> #!/usr/bin/perl -w
> use XML::Parser;
> open (FILE, ">$dir/file$num.xml") or die "Can't open $dir/file$num.xml
> Reason: $!";


You have not put anything into $dir or $num, so you are
trying to write to a file named:       /file.xml


> print DAT "$starttag@raw_data$endtag"; 
            ^         ^^^^^^^^^       ^

You are adding extra spaces that are not in your original data.

Did you mean to do that?

   "Why do I get weird spaces when I print an array of lines?"


> sub char_handler
>  {
>      my ($p, $data) = @_;

>      push( @data_stack, { data=>$data });


All whitespace matters in XML, including the newlines and spaces
used for indenting. Some of the elements in @data_stack contain
these runs of whitespaces, which is throwing off your indexing.

If you avoid putting them into the array, then you indexing
will be accurate:

     push( @data_stack, { data=>$data }) unless $data =~ /^\s*$/;


>  foreach my $d (@data_stack){
> push(@stackdata,"$$d{ data }");
> }


What is that for?


> for($i=0;$i<@stackdata;$i++) {

   for $i ( 0 .. $#stackdata ) {  # does the same thing


> print "$stackdata[$i]";
        ^              ^
        ^              ^  A useless use of double quotes
> }


   foreach my $d (@data_stack) { # one loop instead of two loops
      print $d->{data};
   }


> my $dchildof = $stackdata[0];
> my $dcontact = $stackdata[1];
> my $dpolicy = $stackdata[2];
> my $dassignedto = $stackdata[3];
> my $dproblem = $stackdata[4];
> my $dsummary = $stackdata[5];

>  The out put that iam getting is :
> Name "main::FILE" used only once: possible typo at temp.pl line 3.
> Use of uninitialized value in concatenation (.) or string at temp.pl
> line 3.
> Use of uninitialized value in concatenation (.) or string at temp.pl
> line 3.


Why don't you fix the warnings?


> i want an answer
> soon please....


Right away sir!

We exist only to serve your wishes.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 09 Dec 2002 20:48:03 +0000
From: Scripty <scriptyrich@yahoo.co.uk>
Subject: Re: which UI for Perl? PerlQt Strongly recommended
Message-Id: <at2vh7$991$1@newsg1.svr.pol.co.uk>

Erik Braun wrote:

> I'm looking for a Perl Module, which provides interactive dialogs,
> and some extensions like Radio buttons or file requestors.
> 
> I found some Modules (Dialog, Perlmenu, Cdk, Curses), but did not test
> everything, as this is a lot of work. Is someone around here, who
> had the same problem and can me recommend or discourage from one
> of these?
> 
> erik

Might not be what your looking for, as the modules you mention are all text 
based, but if you want a GUI toolkit I would strongly recommend the new 
PerlQt bindings for Qt3. The caveats are this:

1) Qt licensing issues if you're not using linux (and see 3 below).
2) These bindings are very new, so there are bound to be a few bugs floating 
around.
3) Portability - I think the bindings are strictly for Unix/X11 systems.

I've played around with the alternatives such as WxWindow, GTK, Prima, Tk 
and its not the bindings themselves that put me off, rather the fact there 
are few (if any) good graphical designers for these - though Qt Designer is 
not perfect, it's vastly superior to any alternative I could find.

Equally Qt is a well thought out and well supported toolkit - its laughably 
easy to get modern looking apps up and running, and the signal/slot 
mechanism is far superior to using callbacks.

I'm not one of the PerlQt authors BTW, merely a very happy user!

http://perlqt.infonium.com/

-- 
Scripty
scriptyrich@yahoo.co.uk




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 4237
***************************************


home help back first fref pref prev next nref lref last post