reference of an array into an array

2010-11-04 Thread Christian Stalp
Hello together,
I try to write some arrays into arrays using references. 

my ($a, $b, $c, @mytemp, $myref, @my_globael_array)

while(<$myfile>)
{
   ($a, $b $c ) = getparameter();
   @mytemp = ($a, $b, $c);
   $myref = \...@mytemp;
   push(@my_global_array, $myref);
}

But if I dismantle @my_global_array I get only the last entry, the last array. 

Where is the problem?

Thank you all

Christian

-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




linked list in perl

2006-09-20 Thread Christian Stalp
Hello out there,

I need a Tipp how I can create a linked ring-list in Perl. I know well
that arrays in Perl are already realized as linked list, but what I need
is a ring-list. Means that at the last element owns a reference to the
first element. 

 

Has anybody an idea how to make it?

 

Thanks 

 

Gruss Christian

 

 



linked list

2005-01-21 Thread Christian Stalp
Hello again,
I still have some questions concerning the linked list.
The problem now is, that I try to access the head-pointer of the list after I 
left the loop in which the list were made. 

#!/usr/bin/perl

use warnings;
use strict;
use Data::Dumper;

use constant NEXT => 0;
use constant VAL  => 1;


our $kopf = undef;
my $zeiger = \$kopf;
my $zahl = 5;

foreach ( 1..$zahl )
{
 my $node = [ undef, $_ * $_ ];

 if ( ! $kopf )
 {
  $zeiger = \$node;
  $kopf = \$node;
 }

 else
 {
  $$zeiger -> [ NEXT ] = \$node;
  $zeiger = $node -> [ NEXT ];
 }

 #print $node -> [ VAL ], "\n";
}

print Dumper ( $kopf );
print $$kopf -> [ VAL ], "\n";
$zeiger = $kopf;

while ( ref $zeiger  )
{
 print $$zeiger -> [ VAL ], "\n";
 $zeiger = $$zeiger -> [ NEXT ];
}

But the output shows me just the first two nodes: 1 and 4.
And if I create the nodes inside the loop as global ( our ) then it puts me 
only the last node out.
What did I wrong?

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




linked list again.

2005-01-18 Thread Christian Stalp
Hello again,
I still have some questions concerning the linked list.
The problem now is, that I try to access the head-pointer of the list after I 
left the loop in which the list were made. 

#!/usr/bin/perl

use warnings;
use strict;
use Data::Dumper;

use constant NEXT => 0;
use constant VAL  => 1;


our $kopf = undef;
my $zeiger = \$kopf;
my $zahl = 5;

foreach ( 1..$zahl )
{
 my $node = [ undef, $_ * $_ ];

 if ( ! $kopf )
 {
  $zeiger = \$node;
  $kopf = \$node;
 }

 else
 {
  $$zeiger -> [ NEXT ] = \$node;
  $zeiger = $node -> [ NEXT ];
 }

 #print $node -> [ VAL ], "\n";
}

print Dumper ( $kopf );
print $$kopf -> [ VAL ], "\n";
$zeiger = $kopf;

while ( ref $zeiger  )
{
 print $$zeiger -> [ VAL ], "\n";
 $zeiger = $$zeiger -> [ NEXT ];
}

But the output shows me just the first two nodes: 1 and 4.
And if I create the nodes inside the loop as global ( our ) then it puts me 
only the last node out.
What did I wrong?

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




linked list

2005-01-10 Thread Christian Stalp
Does anybody has any experience with making liked lists in perl.
There is an example in "Mastering Alogrithms in Perl" by Orwant, Hietaniemi 
and Macdonald. But this works does'nt work:

#!/usr/bin/perl

use warnings;
use strict;

use constant NEXT => 0;
use constant VALU => 1;

my ( $list, $tail );

$list = $tail = undef;

foreach ( 1..5 )
{
 my $node = [ undef, $_ * $_ ];
 if ( $tail eq undef )
 {
  $list = $tail = $node;
 }
 else
 {
  $tail -> [ NEXT ] = $node;
  $tail = $node;
 }
}

The output is:
 Use of uninitialized value in string eq at ./kette.pl line 16.

And it is not clear to me where reverences were build from one node to 
another. This should be at $node[0]. But this reverence get nerver been held 
in the loop. Each round the new node overrides the old and only the tail 
points on the actual element!?

Thank you very much

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




options and arguments

2004-11-16 Thread Christian Stalp
Hello together,
I have another problem with arguments and switches as options for a process.
I want one switch and several arguments to call the process. 
Example: kermit.pl -v thunder.txt compare.txt

I try to implement this actually with a hash:

#!/usr/bin/perl

use warnings;
use strict;
use File::Copy;
use Getopt::Std;

my %option = ();
getopts ("vp:", \%option );

our ( $opt_v, $opt_p );
#our $searchpattern = %option{p};
our $input;
our $searchpattern;


if ( $option{v} )
{
 print "The searchpattern ist: $searchpattern and the input $input \n";
}
.

So far it should work. But I get this output:
Name "main::opt_p" used only once: possible typo at ./kermit.pl line 14.
Use of uninitialized value in concatenation (.) or string at ./kermit.pl line 
20.
Use of uninitialized value in concatenation (.) or string at ./kermit.pl line 
20.
The searchpattern ist: and the input

What is the problem? 

Thank you.

Gruss Christian



-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: strict & getopt()

2004-10-15 Thread Christian Stalp
> Declare your variables with our() if you're using Perl 5.6 or better;
> otherwise, declare them with 'use vars'.

All right, it works now, thank you very much.

> If you're using Perl 5.6, don't use "-w" anymore, use the "warnings"
> pragma.

warnings? How does this works? 
#!/usr/bin/perl warnings
or 
use warnings; ?
I just tested it, and both were accepted. 

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




strict & getopt()

2004-10-15 Thread Christian Stalp
Hello together, I have a new problem.

What can I do to use getopt() and use strict? 
If I use strict I have to declare all of my variables. And if I do this, perl 
ignores my getopt(s) single-chars. Is this normal? What can I do to solve 
this? 

I want to use perl with "-w" option and the "strict" pracma. Is this posible?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: cannot call a process via telnet

2004-10-13 Thread Christian Stalp
I just want you to know that the solution of my problem was to change the 
prompt! 

When I call the remote bash via telnet to change the directory it expacted 
the old prompt which was guilty while login:
Prompt => '/\[datagate\]\/KOMM\/datagate > 

But after changing the directory the prompt was modified. So the solution to 
call a simple "ls" is:

@ra = $t->cmd ( String => 'ls',
  Prompt => '/\[datagate\]\/KOMM\/datagate\/STALP\/PERL\/BERT 
> /');
 print @ra;

And to call a routine is:

$rs = $t->cmd ( String => 'komm-test.pl',
 Prompt => '/\[datagate\]\/KOMM\/datagate\/STALP\/PERL\/BERT 
> /');


Hope this helps anybody who'll encounter the same problem ...
MIND THE PROMPT ;-) 

Thanks all for help

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp

> It appears from the docs that the C method can take a timeout as
> well.  I suspect adding the '&' will cause problems because the shell
> will return control to Net::Telnet and there will be no way to
> communicate with the process.  Note that when you switch to include
> other arguments with C it appears you need to pass the command with
> the 'String' key.

Sure but this doesn't make any change if I call the cmd with a prepared 
string or a directly into the brackets. I was at this point a few hours 
before. Calling a process with the cmd- method. Then I found the print - 
method in the docs. But both have the same problem: sending a command over 
the telnet without waiting for the answer. And I don't want to change the 
timeout because the script has more functions than to wait for another 
process exit. The docs doesn't give any solution how to make this!

Its no problem to call a process manualy over the telnet with a '&' at least 
our servers! 

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
Okay now I tryed instead of:
$rs = $t->print ( "./komm-test.pl" ) or die "cannot execute !\n";

this:

$rueck_s = $t->cmd ( "./komm-test.pl" ) or die "Kann kein Script starten!\n";

and get this message:
command timed-out at Refdb.pm line 94
And this is absolutly normal because the script which is called takes a lot 
of time to execute. But to call it with an '&' dosn't fix it neighter 
What can I do in this case?

Thank you very much...

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp
As I expact, I just fixed the scope errors but the problem remains.
This is it:

sub telnet_access
{
 my $username = $main::username;
 my $passwd   = $main::passwd;
 my $command_1 = "cd /home/chris/servlist/";
 my @ra;
 my $rs;
 my $t;

 $t = new Net::Telnet (Timeout => 15,Prompt => '/\[datagate\]\/KOMM\/datagate 
> /') or die "cannot call telnet!\n";

 $t->open ("komm") or die "cannot establish a connection!\n";
 $rs = $t->login ($username, $passwd) or die "login failed\n";
 
 
 @ra = $t->print ( $command_1 ) or die "cannot change dir!\n";
 $rs = $t->print ( "./komm-test.pl" ) or die "cannot start script!\n";
 print "$rs\n";

 $t->close ();
}

It runs without any errors but also without purpose, because it doesn't start 
the script on the remote host. :-\

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: cannot call a process via telnet

2004-10-12 Thread Christian Stalp

> What you have shown won't compile.  Are you using 'strict' and
> 'warnings'?  If not you need to be.
>

Its not the whole file. I paste some parts of the script into the mail 
,renamed the variables in english ... but I also doesn't use strict. Maybe 
this gives me a hint of whats going wrong.

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




cannot call a process via telnet

2004-10-12 Thread Christian Stalp
Hello together,
I have certain problem with the Net::Telnet () -package.
I try to call a program on a remote server over the telnet. ( I cannot use 
SSH in this case! )

my $command = "cd /home/chris/servlist 
$t = new Net::Telnet (Timeout => 15,Prompt => 
'/\[datagate\]\/KOMM\/datagate>/') or die "cannot call telnet!\n";


 $t->open ("komm") or die "cannot establish a connection!\n";
 $rueck = $t->login ($username, $passwd) or die "login failed!\n";

... so far it works. 
But now I try this:

@ra = $t->print ( $command_1 ) or die "cannot change dir !\n"; 
 $rs = $t->print ( "./komm-test.pl" ) or die "cannot start script!\n";
And this doesn't work. I neither crashes down nor gives me a error-message! 
The return value $rs is 1  

$t->close ();

What did I wrong? 

Gruss Christian

P.S by the way, I can see that the script doesn't start because "komm-test.pl 
creates a file if it starts!


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: server is numb?

2004-09-28 Thread Christian Stalp
Okay okay, it shold call:
 while ( $client = $server->accept () )
 {
 print "$client \n";
 }
 close ( $server );
__END_

And so it works, but not as I need. The output is 
IO::Socket::INET=GLOB(0x81848d0)

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




server is numb?

2004-09-28 Thread Christian Stalp
Hello together,
I just tryed to make a simple Socket-Connection with a client and a server 
which are connected with each other over localhost.

the server:
#!/usr/bin/perl

use IO::Socket;
use strict;

my $server_port = 3434;
my $server;
my $client;
my $in_line;

$server = IO::Socket::INET-> new ( LocalPort => $server_port,
   Type  => SOCK_STREAM,
   Reuse => 1,
   Listen=> SOMAXCONN )
 or die "unable to start server ! [EMAIL PROTECTED]";


while ( $client = $server->accept () )
{
 $in_line = ;
 print "$in_line \n";
}

close ( $server );
__END_

and the client:

#!/usr/bin/perl

use IO::Socket;
use strict;

my $remote_host = "localhost";
my $remote_port = 3434;
my $socket;
my $data = "test";

$socket = IO::Socket::INET->new ( PeerAddr => $remote_host,
  PeerPort => $remote_port,
  Proto=> "tcp",
  Type => SOCK_STREAM )
or die "unable to establishe a connection !\n";

$socket-> send ( $data , $flags ) or die "could not send!\n";

close ( $socket );

__END_

I expact, that the data-string is send by the client to the server. When it 
reaches the server, the server put it out, and keep on listening. 

But the server does nothing at all, its numb?!?

What did I omitted? How I get the flags? With fcntl ?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




extern varibales

2004-09-24 Thread Christian Stalp
Hello together,
I have this problem of global variables again. But in my case I need a 
varibale, a string, which should be known in all my modules. I put some of my 
functions out in modules which I call when I use them but all these functions 
also need some directory-pathes as strings. At the time I tell this functions 
this pathes with parameters but this is very long windet. 

Does anybody know another solution. Do we have in perl something like a scope 
EXTERN linke in C ?

Gruss Christian

 
-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




reading encrypted files

2004-09-15 Thread Christian Stalp
Hello together,
I want to use a perl-script with the Net::FTP-Package to transfer files over 
the net. At this time I have only ftp, no ssh, no sftp. 
Therefore I need a user and password for the ftp-access. Now the user and 
password are hardcoded as strings ( as plain ascii ) in my script and this I 
want to change, because of several reasons ;-)) 
What is the best solution for this problem?

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: UnixODBC

2004-09-07 Thread Christian Stalp

> > Hello there,
> > one brief question: needs UnixODBC the DBI or is it totally
> > indipendent?
> >
> > Gruss Christian
>
> DBI are Perl related. unixODBC it's a C library.

Sure, but there is also a perl-Module. 
http://search.cpan.org/~rkies/UnixODBC-0.32/UnixODBC.pm

And so I ask, is there a way to combine these?

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




problems while building Tk

2004-08-27 Thread Christian Stalp
Hello out there...
I have some trouble building the Tk for HPUX. 
My Eviroment is:
HPUX 10.20 on PA-RISC
Perl V 5.8.3
gcc 3.3.2
After the call of perl Makefile.PL I got this dumped:

perl is installed in /usr/local/lib/perl5/5.8.3/PA-RISC2.0 okay
PPM for perl5.008003
Test Compiling config/signedchar.c
Test Compiling config/Ksprintf.c
Test Compiling config/tod.c
Generic gettimeofday()
Using -L/usr/lib/X11R6 to find /usr/lib/X11R6/libX11.2
Cannot find X include files via /include
Cannot find X include files anywhere at ./myConfig line 332.
Compilation failed in require at Makefile.PL line 36.
BEGIN failed--compilation aborted at Makefile.PL line 38.

We have X installed and the headers are under /usr/include/X11 but there is  
only one sub-directory called bitmaps. Inside this there are serveral headers 
but without a ".h"-suffix. 
Is this normal? And what can I do to solf the problem?

Thank you

Gruss Christian


-- 
Christian Stalp

Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI)
Obere Zahlbacher Straße 69
55131 Mainz
Tel.: 06131/ 17-6852

E-Mail: [EMAIL PROTECTED]
Internet: www.imbei.de

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




problems while building Tk

2004-08-25 Thread Christian Stalp
Hello out there...
I have some trouble building the Tk for HPUX. 
My Eviroment is:
HPUX 10.20 on PA-RISC
Perl V 5.8.3
gcc 3.3.2
After the call of perl Makefile.PL I got this dumped:

perl is installed in /usr/local/lib/perl5/5.8.3/PA-RISC2.0 okay
PPM for perl5.008003
Test Compiling config/signedchar.c
Test Compiling config/Ksprintf.c
Test Compiling config/tod.c
Generic gettimeofday()
Using -L/usr/lib/X11R6 to find /usr/lib/X11R6/libX11.2
Cannot find X include files via /include
Cannot find X include files anywhere at ./myConfig line 332.
Compilation failed in require at Makefile.PL line 36.
BEGIN failed--compilation aborted at Makefile.PL line 38.

We have X installed and the headers are under /usr/include/X11 but there is  
only one sub-directory called bitmaps. Inside this there are serveral headers 
but without a ".h"-suffix. 
Is this normal? And what can I do to solf the problem?

Thank you

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: problems while building Tk on HPUX

2004-08-19 Thread Christian Stalp
> Do you have X windows installed?  It appears it can't find the X
> headers.  Also not sure why it is looking in /include for them, not even
> sure it is looking in there? Do you have any -I switches configured, or
> an INCLUDE_PATH??
>
> http://danconia.org

We have installed X but as it seems, we don't have the header-files. In 
/usr/include/X is only one directory called bitmaps, full of header files, 
but without a ".h" suffix.

here is an exapmle for one of them:

#define noenter16_width 16
#define noenter16_height 16
#define noenter16_x_hot 7
#define noenter16_y_hot 7
static char noenter16_bits[] = {
   0x00, 0x00, 0xc0, 0x03, 0xf0, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfc, 0x3f,
   0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0xfc, 0x3f, 0xfc, 0x3f,
   0xf8, 0x1f, 0xf0, 0x0f, 0xc0, 0x03, 0x00, 0x00};

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




docu of the Perl-makefile

2004-08-19 Thread Christian Stalp
Hi out there,
where I can find some informations to modfiy the behavior of perl-Makefiles.
Like: perl Makefile:PL cc=/usr/bin/gcc or to change the include-path aso.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




problems while building Tk on HPUX

2004-08-18 Thread Christian Stalp
Hello together,
I got some errors while I tryed to build Tk on my HPUX-Box.
My enviroment
HPUX 10.20 on HPPA
gcc version 3.3.2
perl 5.8.3
Tk 804.027

 perl Makefile.PL
perl is installed in /usr/local/lib/perl5/5.8.3/PA-RISC2.0 okay
PPM for perl5.008003
Test Compiling config/signedchar.c
Test Compiling config/Ksprintf.c
Test Compiling config/tod.c
Generic gettimeofday()
Using -L/usr/lib/X11R6 to find /usr/lib/X11R6/libX11.2
Cannot find X include files via /include
Cannot find X include files anywhere at ./myConfig line 332.
Compilation failed in require at Makefile.PL line 36.
BEGIN failed--compilation aborted at Makefile.PL line 38.

What is the problem
Thank you...

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




building DBI

2004-07-22 Thread Christian Stalp
Hallo again,
I still hanging at my problem with buidling the Perl:DBI - module!

My enviroment is:

Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
  Platform:
osname=hpux, osvers=10.20, archname=PA-RISC2.0
uname='hp-ux imserv03 b.10.20 a 9000810 2015410517 two-user license '
config_args='-Dcc=/usr/local/bin/gcc -Dsiteprefix=/usr/local'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='/usr/local/bin/gcc', ccflags ='-D_HPUX_SOURCE -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE',
optimize='-O2',
cppflags='-D_HPUX_SOURCE -D_HPUX_SOURCE -fno-strict-aliasing 
-I/usr/local/include'
ccversion='', gccversion='3.3.2', gccosandvers='hpux10.20'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=4
alignbytes=8, prototype=define
  Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl_s -lndbm -lmalloc -ldld -lm
perllibs=-lnsl_s -lmalloc -ldld -lm
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
gnulibc_version=''
  Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-B,deferred '
cccdlflags='-fPIC', lddlflags='-b -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under hpux
  Compiled at Jun  7 2004 13:05:14
  @INC:
/usr/local/lib/perl5/5.8.3/PA-RISC2.0
/usr/local/lib/perl5/5.8.3
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0
/usr/local/lib/perl5/site_perl/5.8.3
/usr/local/lib/perl5/site_perl
.
#

Make works fine BUT "make test" dumped this:

# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basics.ok
t/02dbidrv.ok
t/03handle.ok
t/04mods...ok
t/05thrclone...skipped
all skipped: this hpux perl 5.008003 not configured to support 
iThreads
t/06attrs..ok
t/07kids...ok
t/08keeperrok
t/09trace..ok
t/10examp..ok
t/15array..ok
t/20meta...ok
t/30subclass...ok
t/40profileok
t/41prof_dump..ok
t/42prof_data..ok
t/50dbmok
t/60preparse...ok
t/80proxy..skipped
all skipped: modules required for proxy are probably not installed 
(e.g., RPC/PlClient.pm)
t/zz_01basics_pp...Subroutine bind_columns redefined at 
/home/STALP/DBI-1.42/blib/lib/DBI.pm line 1674.
   Using DBI::PurePerl (DBI_PUREPERL=2) on PA-RISC2.0
t/zz_01basics_pp...ok 24/47Use of inherited AUTOLOAD for non-method 
DBI::SQL_CURSOR_FORWARD_ONLY() is deprecated at t/01basics.t line 87.
Keine Datei und kein Verzeichnis at t/zz_01basics_pp.t line 3.
Can't locate auto/DBI/SQL_CURSOR_.al in @INC (@INC contains: 
/home/STALP/DBI-1.42/blib/lib /home/STALP/DBI-1.42/blib/arch 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0 /usr/local/lib/perl5/5.8.3/PA-RISC2.0 
/usr/local/lib/perl5/5.8.3 /usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
/usr/local/lib/perl5/site_perl/5.8.3 
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
/usr/local/lib/perl5/site_perl/5.8.3 /usr/local/lib/perl5/site_perl . 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0 /usr/local/lib/perl5/5.8.3 
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0 
/usr/local/lib/perl5/site_perl/5.8.3 /usr/local/lib/perl5/site_perl .) at 
t/01basics.t line 87
...propagated at t/zz_01basics_pp.t line 4.
t/zz_01basics_pp...dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 25-47
Failed 23/47 tests, 51.06% okay
t/zz_02dbidrv_pp...Subroutine bind_columns redefined at 
/home/STALP/DBI-1.42/blib/lib/DBI.pm line 1674.
t/zz_02dbidrv_pp...ok 11/36# Test 22 got: '41' (t/02dbidrv.t at line 115)
#Expected: '42'
#  t/02dbidrv.t line 115 is: ok($drh->err, 42); # copied up to drh from dbh 
when dbh was DESTROYd
t/zz_02dbidrv_pp...ok 12/36# Test 24 got: 'foo' (t/02dbidrv.t at line 119)
#Expected: 'foo 42 dbh [err was 42 now 99]
foo'
#  t/02dbidrv.t line 119 is: ok($DBI::errstr, "foo 42 dbh [err was 42 now 
99]\nfoo");
t/zz_02dbidrv_pp...FAILED tests 22, 24
Failed 2/36 tests, 94.44% okay
t/zz_03handle_pp...Subroutine bind_columns redefined at 
/home/STALP/DBI-1.42/blib/lib/DBI.pm line 1674.
t/zz_03handle_pp...ok 32/52# Failed test (t/03handle.t at line 120)
#  got: 

problem while building DBD:Adabas

2004-07-19 Thread Christian Stalp
Hello out there,
I try to build a DBD:Adabas driver for DBI. And I got this dump:

# perl Makefile.PL

Configuring DBD::Adabas ...

>>> Remember to actually *READ* the README file!
And re-read it if you have any problems.

Multiple copies of Driver.xst found in: 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI 
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0/auto/DBI at Makefile.PL line 
59
Using DBI 1.40 (for perl 5.008003 on PA-RISC2.0) installed in 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI
Using ODBC in /REFDB_HOME/referenz/adabas_d

Umm, this looks like a adabas type of driver manager.

Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in: 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI 
/usr/local/lib/perl5/site_perl/5.8.3/PA-RISC2.0/auto/DBI at Makefile.PL line 
224
Using DBI 1.40 (for perl 5.008003 on PA-RISC2.0) installed in 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI
Writing Makefile for DBD::Adabas

The DBD::Adabas tests will use these values for the database connection:
DBI_DSN=dbi:Adabas:refdbe.g. dbi:Adabas:demo
DBI_USER=somewho
DBI_PASS=something


# make
cp Adabas.pm blib/lib/DBD/Adabas.pm
/usr/bin/perl -p -e "s/~DRIVER~/Adabas/g" 
/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI/Driver.xst > Adabas.xsi
/usr/bin/perl /usr/local/lib/perl5/5.8.3/ExtUtils/xsubpp  -typemap 
/usr/local/lib/perl5/5.8.3/ExtUtils/typemap  Adabas.xs > Adabas.xsc && mv 
Adabas.xsc Adabas.c
Warning: duplicate function definition 'data_sources' detected in Adabas.xs, 
line 114
/usr/local/bin/gcc -c  -I. 
-I/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI 
-I/REFDB_HOME/referenz/adabas_d/incl  -D_HPUX_SOURCE -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE -O2-DVERSION=\"0.2003\"  
-DXS_VERSION=\"0.2003\" -fPIC "-I/usr/local/lib/perl5/5.8.3/PA-RISC2.0/CORE"  
 Adabas.c
In file included from dbdodbc.h:9,
 from Adabas.h:9,
 from Adabas.xs:1:
/REFDB_HOME/referenz/adabas_d/incl/WINDOWS.H:105:1: warning: "VOID" redefined
/REFDB_HOME/referenz/adabas_d/incl/WINDOWS.H:27:1: warning: this is the 
location of the previous definition
/usr/local/bin/gcc -c  -I. 
-I/usr/local/lib/perl5/5.8.3/PA-RISC2.0/auto/DBI 
-I/REFDB_HOME/referenz/adabas_d/incl  -D_HPUX_SOURCE -fno-strict-aliasing 
-I/usr/local/include -D_LARGEFILE_SOURCE -O2-DVERSION=\"0.2003\"  
-DXS_VERSION=\"0.2003\" -fPIC "-I/usr/local/lib/perl5/5.8.3/PA-RISC2.0/CORE"  
 dbdimp.c
In file included from dbdodbc.h:9,
 from Adabas.h:9,
 from dbdimp.c:12:
/REFDB_HOME/referenz/adabas_d/incl/WINDOWS.H:105:1: warning: "VOID" redefined
/REFDB_HOME/referenz/adabas_d/incl/WINDOWS.H:27:1: warning: this is the 
location of the previous definition
dbdimp.c: In function `adabas_db_login':
dbdimp.c:104: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c: In function `adabas_error':
dbdimp.c:273: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c:299: warning: passing arg 1 of `fprintf' from incompatible 
pointer typedbdimp.c:304: warning: passing arg 1 of `fprintf' from 
incompatible pointer typedbdimp.c:331: warning: passing arg 1 of `fprintf' 
from incompatible pointer typedbdimp.c: In function `dbd_preparse':
dbdimp.c:437: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c: In function `dbd_st_tables':
dbdimp.c:489: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c: In function `adabas_st_prepare':
dbdimp.c:560: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c: In function `adabas_describe':
dbdimp.c:678: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c:684: warning: passing arg 1 of `fprintf' from incompatible 
pointer typedbdimp.c:772: warning: passing arg 1 of `fprintf' from 
incompatible pointer typedbdimp.c:840: warning: passing arg 1 of `fprintf' 
from incompatible pointer typedbdimp.c: In function `adabas_st_execute':
dbdimp.c:871: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c: In function `adabas_st_fetch':
dbdimp.c:951: warning: passing arg 1 of `fprintf' from incompatible pointer 
typedbdimp.c:976: warning: passing arg 1 of `fprintf' from incompatible 
pointer typedbdimp.c: In function `_dbd_rebind_ph':
dbdimp.c:1136: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c:1174: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c:1202: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c:1246: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c: In function `adabas_bind_ph':
dbdimp.c:1319: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c: In function `adabas_st_blob_read':
dbdimp.c:1398: warning: passing arg 1 of `fprintf' from incompatible pointer 
type
dbdimp.c:1424: warning: passi

globals at dbi

2004-06-14 Thread Christian Stalp
Hello world\n ;-)

Im wondering about my perl. With this code:
#!/usr/local/bin/perl


use DBI;
use strict;

print "Test\n";


::$my_user = "blabla";
my $password = "bloobbloob";

my $logon = Adabas::logon("demo,adabas","mycomp:mydb");

I got somethink like that:
Global symbol "$chris_test_var" requires explicit package name at 
./komm-test2.pl line 9.
Execution of ./komm-test2.pl aborted due to compilation errors.

Is it not longer possible to set variables easly as globals? First I tryed 
this with $my_user or $test_var... without "::", and the result was the same.
Is this something special with DBI?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: error while building perl

2004-05-14 Thread Christian Stalp
Hey Jose,
the output is:
core file size (blocks) 2097151
data seg size (kbytes)  65536
file size (blocks)  unlimited
max memory size (kbytes)unlimited
open files  2048
pipe size (512 bytes)   16
stack size (kbytes) 8192
cpu time (seconds)  unlimited
max user processes  598
virtual memory (kbytes) unlimited

I think the virtual memory is not really the problem?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




error while building perl

2004-05-14 Thread Christian Stalp
Hello, 
I just tryed to build perl with the gcc and got this dumped:

   `sh  cflags "optimize='-O2'" toke.o`  toke.c
  CCCMD =  /opt/gcc/bin/gcc -DPERL_CORE -c -D_HPUX_SOURCE 
-DUINT32_MAX_BROKEN -fno-strict-aliasing -D_LARGEFILE_SOURCE 
-DARG_ZERO_IS_SCRIPT -O2  -Wall
toke.c: In function `Perl_yylex':
toke.c:5244: virtual memory exhausted
*** Error exit code 1

Stop.

What can I do to avoid this?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: installing DBI on HPUX

2004-05-10 Thread Christian Stalp



> You either need the HP ANSI C compiler or GCC. Since you seem to use a perl
> which was build using the HP ANSI C compiler it's easiest to install that
> compiler on the system you're trying to get DBI to work. However, you need
> to PAY for that compiler so you might want to switch to GCC. I'm not
> entirely sure if you would need to recompile perl itself with GCC for that
> to work. (would be best no doubt)

Hello, I allready installed gcc but the Makefile calls the HPUX-cc compiler. 
(CC = cc )
How can I tell the system to use the gcc instead of the cc?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: installing DBI on HPUX

2004-05-10 Thread Christian Stalp
I tryed it at another way. I got an older version: DBI-1.21 because I still 
use perl 5.6 not 5.6.1!

perl Makefile.pl works, all is fine.

But now I get this:

(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the 
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +z option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 532: error 
1000: Unexpected symbol: "nbytes".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1000: Unexpected symbol: "elements".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1000: Unexpected symbol: "size_t".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 532: error 
1506: Parameters allowed in function definition only.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1573: Type of "size" is undefined due to an illegal declaration.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1573: Type of "nbytes" is undefined due to an illegal declaration.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 537: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 1816: error 
1000: Unexpected symbol: "SV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/iperlsys.h", line 411: 
warning 5: "const" will become a keyword.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/iperlsys.h", line 411: 
error 1000: Unexpected symbol: "const".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/regexp.h", line 13: error 
1000: Unexpected symbol: "U8".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 329: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 330: error 
1000: Unexpected symbol: "ANY".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 331: error 
1000: Unexpected symbol: "GV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 25: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 26: error 
1000: Unexpected symbol: "ANY".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 27: error 
1000: Unexpected symbol: "GV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 14: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 14: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 15: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 15: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 16: error 
1000: Unexpected symbol: "U32".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 16: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 17: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 17: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 18: error 
1000:
Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 18: error 
1000:
Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 23: error 
1000:
Unexpected symbol: "MAGIC".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/utf8.h", line 25: warning 
5: "const" will become a keyword.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/utf8.h", line 25: error 
1000: Unexpected symbol: "unsigned".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 1852: error 
1000: Unexpected symbol: "CURCUR".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2058: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2059: error 
1000: Unexpected symbol: "I32".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2059: error 
1000: Unexpected symbol: "SV".
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Stop.
---


It seems to me that I have some trouble with my c-compiler ???!

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




installing DBI on HPUX

2004-05-10 Thread Christian Stalp
Hello together,
I have a problem! I use a HP-PaRisc Server with HPUX 10.20 and I just tried
to install the DBI-module for Perl.

After calling: perl Makefile.PL I got this warning:
Warning: prerequisite Test::More failed to load: Can't locate Test/More.pm in 
@INC (@INC contains: lib /opt/perl5/lib/5.6.0/PA-RISC1.1 /opt/perl5/lib/5.6.0 
/opt/perl5/lib/site_perl/5.6.0/PA-RISC1.1 /opt/perl5/lib/site_perl/5.6.0 
/opt/perl5/lib/site_perl .) at (eval 8) line 3, <> line 1.

After that the make dosn't work either!
What can I do?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: tempfile

2004-04-06 Thread Christian Stalp

> Did you find a way to set the filename to "temp_file.lock"? The OP has
> obviously RTFM.

Is no problem now with:
open LOCK_FH , ">$file_name"  or die "cannot create hanlde!\n";
.
.
.
close LOCK_FH;

unlink ( $file_name ) or warn "cannot delete !\n";

I can do what I want to do. I just thought that tempfile can do all this in 
one step. As you sayed, my file has the purpose to lock other instances of 
the perl-script so only one can run at a time. 

Thank you

  Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




tempfile

2004-04-06 Thread Christian Stalp
Hello together,
I want to create a tempfile via the function tempfile.
But I want a certain path and name for the file. 
The option DIR and SUFFIX and s.o. is clear to me but how can I
set the name of the file? For Exam:  temp_file.lock or somethink like that!?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




export of getopts

2004-03-15 Thread Christian Stalp
Hello together,
Im looking for a method to tell my program that it has to put out debug 
statements. With getopts("d") I allready managed that my main-routine does 
this. But the subroutines I realized as packages in their own files. So when 
I call my subroutines via package::methode() they don't care if I switched 
the debug-mode on or not. Is there a simple way to export the getopt 
arguments to tell also the subroutines to dump out debugging-statements?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




how to make sure, that the script is running one time?

2004-03-12 Thread Christian Stalp
Hello together,
I have a question regarding process-control. I want to write a perl script 
which must not running in more than one process in the same time. The script 
creates a directory copys a zip-file in it, unpack it and reads every file in 
this package. However, the files must not get opened by another process.
How can I make sure, that my perl-scipt runs only in one process, or eaysier,
is there a function "flock" which blocks a whole directory and not only a 
single file?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]