file upload issues!

2011-06-14 Thread Rahul!!
Hi All,

Actually I am trying to store the file a user has uploaded through web-
page to database. But its not getting updated fully and it's showing
only few bytes. Point here is user will upload exe or dll and I have
to store it in DB. I am highlighting the code snippet,


//WEB PAGE CODE
form method=post ENCTYPE=multipart/form-data
input type=hidden name=type value=application/octet-stream
bPath to file:/bbr
input type=file name=data size=60brbr

bDescription/b:br
input name=description size=60brbr
input type=submit value=Submit
/form

# CGI code to insert data
 my $mimetype = $cgi-param('type');

$dbh-doinsert into req_attachments
.  (filename, description, mimetype, submitter_id,
thedata)
.  values
. (
. $dbh-quote($fname) . , 
. $dbh-quote ($description) . , 
. $dbh-quote($mimetype) . , 
. login_to_id($user-login) . , 
. $dbh-quote($cgi-param('data')) . ));

Please let me know if I am doing something is wrong here
-Rahul


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




file upload issues!

2011-06-14 Thread Rahul!!
Hi All,

Actually I am trying to store the file a user has uploaded through web-
page to database. But its not getting updated fully and it's showing
only few bytes. Point here is user will upload exe or dll and I have
to store it in DB. I am highlighting the code snippet,


//WEB PAGE CODE
form method=post ENCTYPE=multipart/form-data
input type=hidden name=type value=application/octet-stream
bPath to file:/bbr
input type=file name=data size=60brbr

bDescription/b:br
input name=description size=60brbr
input type=submit value=Submit
/form

# CGI code to insert data
 my $mimetype = $cgi-param('type');

$dbh-doinsert into req_attachments
.  (filename, description, mimetype, submitter_id,
thedata)
.  values
. (
. $dbh-quote($fname) . , 
. $dbh-quote ($description) . , 
. $dbh-quote($mimetype) . , 
. login_to_id($user-login) . , 
. $dbh-quote($cgi-param('data')) . ));

Please let me know if I am doing something is wrong here
-Rahul


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




Reliably restarting sleep

2011-06-14 Thread gator_ml
Hi,

the subject is admittedly not very enlighening ... ;-;
what I am trying to do is:

- run a little program, that just sleeps for a given time
- when it receives a signal, restarts sleeping again for the
  full time period until it receives another signal or the
  timer elapses. In the latter case it should just exit.
  Something like:

sub sleeper {
warn strftime(%H:%M:%S sleep $sleeptime\n, localtime);
$SIG{USR1}=\sleeper;
sleep $sleeptime;
};

warn $$;
sleeper;

It sounds very simple, but I can't get it to work as intended.
I tryied it in numberless variations using sleep, Time::HiRes,
alaram/pause ... the actual result is always pretty much the same:

- When the program receives the 1st USR1 signal, it is interrupted
  immediately and sleeper is called. The pending alarm is obviously
  canceled and restarted as intended
- Any subsequent USR1 signal is only reacted to when the full $sleeptime
  starting from the previous signal is elapsed. If more than 1 signal is
  received in the meantime, additional signals are lost.

Does anybody have an idea why this doesn't work and how to get the
intendeded result? Any suggestions are appreciated ...
(This is taking place on a Linux 2.6.32 kernel using perl 5.10.0 ...)

Regards,
 Peter


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




Re: Check if words are in uppercase?

2011-06-14 Thread Beware
@John : Thank you for your advices.

@Rob Dixon : Your script works fine, but i want to add a little more
thing. In fact, i want to detect if a word is in line (of course) and
if it's not in uppercase.
I mean, for example, i want to detect :
aLL
aLl
All
etc..
but not ALL (which is correct for me).

Thanks.


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




Convert HTML to PDF

2011-06-14 Thread Ramprasad Prasad
I am trying to use PDF::FromHTML on my linux ( Fedora 12 )  machine


I have just copied the man page example  but I cant get it to run

---
#!/usr/bin/perl
use PDF::FromHTML;
my $pdf = PDF::FromHTML-new( encoding = 'utf-8' );
$pdf-load_file('source.html');
$pdf-convert(
Font= 'font.ttf',
LineHeight  = 10,
Landscape   = 1,
);
$pdf-write_file('target.pdf');


I am getting an error like

perl: symbol lookup error:
/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/auto/HTML/Tidy/Tidy.so:
undefined symbol: tidyCreate


Is there a better way of creating PDF from HTML .. I believe this particular
module is not much supported any longer








-- 
Thanks
Ram
  http://www.netcore.co.in/




n http://pragatee.com


Re: Reliably restarting sleep

2011-06-14 Thread gator_ml
Hi,

On 2011-06-14 09:23, gator...@yahoo.de wrote:
 what I am trying to do is:
 
 - run a little program, that just sleeps for a given time
 - when it receives a signal, restarts sleeping again for the
   full time period until it receives another signal or the
   timer elapses. In the latter case it should just exit.
   Something like:
 
 sub sleeper {
 warn strftime(%H:%M:%S sleep $sleeptime\n, localtime);
 $SIG{USR1}=\sleeper;
 sleep $sleeptime;
 };
 
 warn $$;
 sleeper;
 
 It sounds very simple, but I can't get it to work as intended.

... meanwhile a found a solution; in case somebody with
the same problem stumbles upon this, here's what I came up with:

my $caught_signal=0;

sub expired {
warn strftime(%H:%M:%S expired\n, localtime);
exit 0;
}

sub sleeper {
warn strftime(%H:%M:%S sleep $sleeptime\n, localtime);
alarm $sleeptime; pause;
};

sub usr1 { alarm 0; $caught_signal=1; }

$SIG{USR1}=\usr1;
$SIG{ALRM}=\expired;
while(1) {
if($caught_signal) {
$caught_signal=0;
} else {
sleeper();
}
}

The problem obviously was, that I called sleep from within the
USR1 signal handler and (generally not a bad idea ;) this signal
had been blocked there.
If somebody knows a more elegant solution, let me know ...

Regards,
Peter


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




Seeking opinions about YAPCs

2011-06-14 Thread D
Hello everyone,

I just now realized that the next YAPC is in Asheville, NC, which is
right in my backyard (+2 hrs of driving).  I'm very tempted to attend,
but I've never been to a YAPC.  Any opinions out there as to their
usefulness?  Also, what happens in the hackathons?  I have a program
that I've been working on that I'd love to discuss with more learned
perl folks; I know it needs some reorganization and reworking.  I'm
dreaming of this hackathon being a place where people mull about
tables kibitzing perl programs... maybe I should start playing chess
again.

Demian


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




Re: Seeking opinions about YAPCs

2011-06-14 Thread John SJ Anderson
On Tue, Jun 14, 2011 at 08:50, D demianricca...@gmail.com wrote:
 I just now realized that the next YAPC is in Asheville, NC, which is
 right in my backyard (+2 hrs of driving).  I'm very tempted to attend,
 but I've never been to a YAPC.  Any opinions out there as to their
 usefulness?

IMO: Extremely useful, totally worth it, and a bargain at the price.
You'll learn stuff, meet people, and generally have a great time.


j.

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




Re: Seeking opinions about YAPCs

2011-06-14 Thread Paul Johnson
On Tue, Jun 14, 2011 at 05:50:37AM -0700, D wrote:
 Hello everyone,
 
 I just now realized that the next YAPC is in Asheville, NC, which is
 right in my backyard (+2 hrs of driving).  I'm very tempted to attend,
 but I've never been to a YAPC.  Any opinions out there as to their
 usefulness?

If you are able to attend, I strongly recommend doing so.  You will find
many people there to be very approachable.  I believe that there is
going to be a separate beginners track, along with the more advanced
talks.

  Also, what happens in the hackathons?

Pretty much whatever people want to happen.  I'm not sure what has been
organised, but generally a hackathon will be based around a theme, in
order to get people who are interested in the same topics working
together.

 I have a program
 that I've been working on that I'd love to discuss with more learned
 perl folks; I know it needs some reorganization and reworking.  I'm
 dreaming of this hackathon being a place where people mull about
 tables kibitzing perl programs... maybe I should start playing chess
 again.

Yeah, that sort of thing happens.  I'm sure you can just turn up and
talk to people.  Alternatively, you can probably chat to people in the
hallway track.

You can get a lot out of YAPCs by attending the various talks.  Arguably
you can get even more from YAPCs by being sociable and meeting other
perl folk and sharing ideas and experiences.

I'll be going to YAPC::Europe in Riga and attending some of the talks on
the beginners track.  Will anyone else be there, or at Asheville?

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

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




Re: Seeking opinions about YAPCs

2011-06-14 Thread eko . budiharto
Dear all,
Can someone tell me what the YAPC is? Thx.

Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

-Original Message-
From: D demianricca...@gmail.com
Date: Tue, 14 Jun 2011 05:50:37 
To: beginners@perl.org
Subject: Seeking opinions about YAPCs

Hello everyone,

I just now realized that the next YAPC is in Asheville, NC, which is
right in my backyard (+2 hrs of driving).  I'm very tempted to attend,
but I've never been to a YAPC.  Any opinions out there as to their
usefulness?  Also, what happens in the hackathons?  I have a program
that I've been working on that I'd love to discuss with more learned
perl folks; I know it needs some reorganization and reworking.  I'm
dreaming of this hackathon being a place where people mull about
tables kibitzing perl programs... maybe I should start playing chess
again.

Demian


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




Re: Seeking opinions about YAPCs

2011-06-14 Thread Natal Ngétal
2011/6/14  eko.budiha...@gmail.com:
 Can someone tell me what the YAPC is? Thx.
YAPC is a very cool Perl conference, YAPC means Yet Another Perl
Conference. For more informations you can watch wikipedia or website:
http://en.wikipedia.org/wiki/Yet_Another_Perl_Conference
http://www.yapc.org/

-- 
\0/ Hobbestigrou
site web: erakis.im

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




Re: Check if words are in uppercase?

2011-06-14 Thread Jim Gibson

At 12:30 AM -0700 6/14/11, Beware wrote:

@John : Thank you for your advices.

@Rob Dixon : Your script works fine, but i want to add a little more
thing. In fact, i want to detect if a word is in line (of course) and
if it's not in uppercase.
I mean, for example, i want to detect :
aLL
aLl
All
etc..
but not ALL (which is correct for me).


if( $word =~ /^all$/i  $word ne 'ALL' )


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




Re : Re: Check if words are in uppercase?

2011-06-14 Thread Beware
Hi and thank you for your answer.

But how can i use it with a list of word.


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




Re: Convert HTML to PDF

2011-06-14 Thread Dr.Ruud

On 2011-06-14 10:54, Ramprasad Prasad wrote:


I am trying to use PDF::FromHTML on my linux ( Fedora 12 )  machine
[...]
Is there a better way of creating PDF from HTML .. I believe this particular
module is not much supported any longer


I prefer to use webkit for this:
https://code.google.com/p/wkhtmltopdf/

--
Ruud

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




Re: Re : Re: Check if words are in uppercase?

2011-06-14 Thread Jim Gibson
On 6/14/11 Tue  Jun 14, 2011  7:47 AM, Beware mathieu.hed...@gmail.com
scribbled:

 Hi and thank you for your answer.
 
 But how can i use it with a list of word.
 

Use what? You need to put a little context in your messages so people can
help you without seeing previous messages.


If you have a list of words in an array (@words) and you want to see if some
string ($string) matches those words except for case and is not all
upper-case, there are several possibilities.

1. You can test if a string consists of only upper-case letters:

  if( $string =~ /^[A-Z]+$/ )

2. You can test if $string matches any of the words in @words in
case-insensitive fashion:

 
  for my $word ( @words ) {
if( $string =~ /^$word$/i ) {
  # string matches
  last;  # no need for further tests
}
  }

3. You can do both:

  for my $word ( @words ) {
if( $string =~ /^$word$/i  $string ne uc $word ) {
  # string matches
  last;  # no need for further tests
}
  }

(You can also set all members of @word to upper-case to begin with.)

What exactly are you trying to do? Can you provide a Perl program that
illustrates this?



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




Re: Problem with SDL::Perl

2011-06-14 Thread Adam Fairbrother
My bad, I guess I glossed by the sdl-de...@perl.org list when I was looking 
through.

Here is a link to a file that contains the stdout from fforce install 
Alien::SDL SDL inside the cpan shell.  If it's not the information you were 
looking for let me know and I can provide the correct info.

http://dl.dropbox.com/u/949632/build.text

#--
Adam Fairbrother
Help Desk Technician  
afairbrot...@sd73.bc.ca  
School District #73

- Kartik Thakore thakore.kar...@gmail.com wrote:

  Hi,
 H Adam,
 
  It's been a week since I asked about this and No one has responded, 
 Did I ask incorrectly or in the wrong mailing list?
 
 Apologies for that I normally don't see this mailing list.
 sdl-de...@perl.org is a better list for these things.
  Any help that could be provided would be appreciated. 
 
 Absolutely, it seems that your Alien::SDL install had a bit of a
 hiccup. Can you paste your
 build text? 
 
 $ cpan 
   = fforce install Alien::SDL SDL
 
 
  Thanks,
  
  #--
  Adam Fairbrother
  Help Desk Technician  
  afairbrot...@sd73.bc.ca   
  School District #73
 
  - Adam Fairbrother afairbrot...@sd73.bc.ca wrote:
 
   Hi I'm having a bit of trouble getting a SDL::Perl running on a
 debian
   Lenny setup.
   
   I have SDL::Perl installed from CPAN.
   Alien::SDL installed from cpan with the option to build all
   dependencies and library's.
  
   When I was testing to get things working, my short test script
 would
   throw an error.  The script and the error are below.
   
   I have libjpeg.so.8 built in the Alien SDL directory, but my guess
 is
   that SDL isn't correctly configured to pick up that library
 folder.  I
   don't want to mess up the system SDL install incase something
 goes
   wrong, and I can't install libjpeg.so.8 from packages on Lenny,
 as
   there is no package for it.
  
   How do I have SDL recognize the library's provided by SDL::Alien,
 or
   what am I doing wrong? 
  
   Thanks,
  
  
   Here is my script:
  
   #!/usr/bin/perl 
   use 5.010;
   use strict;
   use warnings;
   use SDLx::App;
   use SDLx::Sprite;
  
   my $app = SDLx::App-new(height=1024,width=768);
   
   my $sprite = SDLx::Sprite-new(image='pic.jpg');
   $sprite-draw($app);
  
  Here is the Error
  
   error loading image pic.jpg: Failed loading libjpeg.so.8:
   libjpeg.so.8: cannot open shared object file: No such file or
   directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188
  SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at
   /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25
  SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg')
 called
   at ./slideshow.pl line 14
   
  
   #--
   Adam Fairbrother
   Help Desk Technician  
   afairbrot...@sd73.bc.ca   
   School District #73
  
  -- 
  To unsubscribe, e-mail: beginners-unsubscr...@perl.org
  For additional commands, e-mail: beginners-h...@perl.org
  http://learn.perl.org/
 -- 
 Kartik Thakore thakore.kar...@gmail.com

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




Re: Problem with SDL::Perl

2011-06-14 Thread Kartik Thakore
 Hi,
H Adam,

 It's been a week since I asked about this and No one has responded,  Did I 
 ask incorrectly or in the wrong mailing list?

Apologies for that I normally don't see this mailing list. sdl-de...@perl.org 
is a better list for these things.
 Any help that could be provided would be appreciated. 

Absolutely, it seems that your Alien::SDL install had a bit of a hiccup. Can 
you paste your
build text? 

$ cpan 
  = fforce install Alien::SDL SDL


 Thanks,
 
 #--
 Adam Fairbrother
 Help Desk Technician  
 afairbrot...@sd73.bc.ca   
 School District #73

 - Adam Fairbrother afairbrot...@sd73.bc.ca wrote:

  Hi I'm having a bit of trouble getting a SDL::Perl running on a debian
  Lenny setup.
  
  I have SDL::Perl installed from CPAN.
  Alien::SDL installed from cpan with the option to build all
  dependencies and library's.
 
  When I was testing to get things working, my short test script would
  throw an error.  The script and the error are below.
  
  I have libjpeg.so.8 built in the Alien SDL directory, but my guess is
  that SDL isn't correctly configured to pick up that library folder.  I
  don't want to mess up the system SDL install incase something goes
  wrong, and I can't install libjpeg.so.8 from packages on Lenny, as
  there is no package for it.
 
  How do I have SDL recognize the library's provided by SDL::Alien, or
  what am I doing wrong? 
 
  Thanks,
 
 
  Here is my script:
 
  #!/usr/bin/perl 
  use 5.010;
  use strict;
  use warnings;
  use SDLx::App;
  use SDLx::Sprite;
 
  my $app = SDLx::App-new(height=1024,width=768);
  
  my $sprite = SDLx::Sprite-new(image='pic.jpg');
  $sprite-draw($app);
 
 Here is the Error
 
  error loading image pic.jpg: Failed loading libjpeg.so.8:
  libjpeg.so.8: cannot open shared object file: No such file or
  directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188
 SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at
  /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25
 SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg') called
  at ./slideshow.pl line 14
  
 
  #--
  Adam Fairbrother
  Help Desk Technician  
  afairbrot...@sd73.bc.ca   
  School District #73
 
 -- 
 To unsubscribe, e-mail: beginners-unsubscr...@perl.org
 For additional commands, e-mail: beginners-h...@perl.org
 http://learn.perl.org/
-- 
Kartik Thakore thakore.kar...@gmail.com


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




Re: Problem with SDL::Perl

2011-06-14 Thread Adam Fairbrother
$LD_LIBRARY_PATH was unset. I set it manually to the SDL Libs folder, and the 
error no longer happens.  My test picture dosn't show up, but I think that's an 
issue I can hack through myself.

Thanks you for all the help with this.

#--
Adam Fairbrother
Help Desk Technician  
afairbrot...@sd73.bc.ca   
School District #73

- Kartik Thakore thakore.kar...@gmail.com wrote:

 Hmm that is all fine. Can I see your LD_LIBRARY_PATH?
 
 echo $LD_LIBRARY_PATH 
 
 Are you still getting the problem btw cause the tests run fine. 
 
 On Tue, 2011-06-14 at 09:47 -0700, Adam Fairbrother wrote:
  My bad, I guess I glossed by the sdl-de...@perl.org list when I was
 looking through.
  
  Here is a link to a file that contains the stdout from fforce
 install Alien::SDL SDL inside the cpan shell.  If it's not the
 information you were looking for let me know and I can provide the
 correct info.
  
  http://dl.dropbox.com/u/949632/build.text
  
  #--
  Adam Fairbrother
  Help Desk Technician  
  afairbrot...@sd73.bc.ca  
  School District #73
  
  - Kartik Thakore thakore.kar...@gmail.com wrote:
  
Hi,
   H Adam,
   
It's been a week since I asked about this and No one has
 responded, 
   Did I ask incorrectly or in the wrong mailing list?
   
   Apologies for that I normally don't see this mailing list.
   sdl-de...@perl.org is a better list for these things.
Any help that could be provided would be appreciated. 
   
   Absolutely, it seems that your Alien::SDL install had a bit of a
   hiccup. Can you paste your
   build text? 
   
   $ cpan 
 = fforce install Alien::SDL SDL
   
   
Thanks,

#--
Adam Fairbrother
Help Desk Technician  
afairbrot...@sd73.bc.ca   
School District #73
   
- Adam Fairbrother afairbrot...@sd73.bc.ca wrote:
   
 Hi I'm having a bit of trouble getting a SDL::Perl running on
 a
   debian
 Lenny setup.
 
 I have SDL::Perl installed from CPAN.
 Alien::SDL installed from cpan with the option to build all
 dependencies and library's.

 When I was testing to get things working, my short test
 script
   would
 throw an error.  The script and the error are below.
 
 I have libjpeg.so.8 built in the Alien SDL directory, but my
 guess
   is
 that SDL isn't correctly configured to pick up that library
   folder.  I
 don't want to mess up the system SDL install incase something
   goes
 wrong, and I can't install libjpeg.so.8 from packages on
 Lenny,
   as
 there is no package for it.

 How do I have SDL recognize the library's provided by
 SDL::Alien,
   or
 what am I doing wrong? 

 Thanks,


 Here is my script:

 #!/usr/bin/perl 
 use 5.010;
 use strict;
 use warnings;
 use SDLx::App;
 use SDLx::Sprite;

 my $app = SDLx::App-new(height=1024,width=768);
 
 my $sprite = SDLx::Sprite-new(image='pic.jpg');
 $sprite-draw($app);

Here is the Error

 error loading image pic.jpg: Failed loading libjpeg.so.8:
 libjpeg.so.8: cannot open shared object file: No such file or
 directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line
 188
SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called
 at
 /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25
SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg')
   called
 at ./slideshow.pl line 14
 

 #--
 Adam Fairbrother
 Help Desk Technician  
 afairbrot...@sd73.bc.ca   
 School District #73

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
   -- 
   Kartik Thakore thakore.kar...@gmail.com
 
 -- 
 Kartik Thakore thakore.kar...@gmail.com

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




help: segmentation fault in threads program that use binmode

2011-06-14 Thread anders lee


when i use binmode in threaded program, i got a segmentation fault;

i comment the binmode line, the program works well


use threads;
use threads::shared;

use utf8;
binmode(STDOUT, ':encoding(utf8)';

---thread create and join-



--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

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