Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#perl

01 November 2007


Total 36 pages. You are browsing page 1/36.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Thu Nov 01 00:00:05 2007
00:00 <****> binmode $ARGV[0]; doesn't work. what is the good way ?
00:00 <****> to do what?
00:01 <****> binmode is for calling on a filehandle, unless you've been fiddling with @ARGV, $ARGV[0] is not a filehandle
00:02 * amnesiac pushes Somni into <****>
00:05 <****> I've been trying to the the temp filename of an uploaded file after upload, so I can move it to another folder, but the File::Temp function tempfile() is supposed to retrieve the temp filename, but it just creates a name. Any ideas? Perl5 Win32 IIS
00:05 <****> eh?
00:06 <****> File::Temp is just for generating names of temporary files .. it has nothing to do with uploads ..
00:08 <****> oh, I read on cpan 'return name and handle of a temporary file safely', so I thought it was used to return a temp files name. What module should I be using then?
00:08 <****> it does
00:08 <****> that temporary filename is given to you by whatever code you're using
00:08 <****> I assume you're using CGI.pm?
00:08 <****> If so, look at its docs on uploads
00:11 <****> Woosta: K, I'll do that thnx
00:12 <****> hi all, I'm a perl noob, its my first day with perl. I'm currently on windows and I'd like to know how to brake op the string I got from system("systeminfo"); into smaller strings, I should use a tokenizer hey?
00:12 <****> tobor: check the CGI.pm internals for tmpFileName() - it's there but the last time I checked it wasn't doc'd
00:14 <****> scarfreewill: I'd be surprised if you got a string at all from system("systeminfo")
00:15 <****> bennymack, yeah I was suprised too :P
00:15 <****> .... windows....
00:15 <****> getting the temp filename from CGI.pm is probably not the way to go; you have a filehandle open to it, use that
00:15 <****> so, the behavior of system is different on windows than *nux?
00:15 <****> I'm currently looking through http://cpan.uwinnipeg.ca/htdocs/Text-Tokenizer/Text/Tokenizer.pm.html
00:15 <****> scarfreewill's url is at http://xrl.us/7x8t
00:16 <****> scarfreewill: you don't get a string from system(), it writes straight to stdout; perldoc -f system
00:16 <****> system doesn't return a string, scarfreewill.
00:16 <****> oh ok..
00:16 <****> you want qx (``).
00:18 <****> o my sack, windows has perldoc -f system in its path but not perl
00:18 <****> ....windows...
00:19 <****> f00li5h, MEOW
00:27 * CPAN upload: Search-Xapian-1.0.4.0 (++++ ) by OLLY
00:27 <****> TMTOWTDlt: So happy to hear about tmpFileName()... until I found out it doesn't work under Windows.
00:27 <****> windows...
00:28 <****> heh
00:30 <****> core: File::Temp
00:30 <****> Khisanth: Added to perl core as of 5.006001
00:31 <****> tobor: I'm on windows - works fine for me
00:33 <****> using undocumented things would not be a very smart move
00:36 <****> TMTOWTDlt: no dice for me... my $tmp_filename = tmpFileName() or die "$0: tmpFileName() function failed: $!\n"; it just dies
00:37 <****> Can't locate Text/Tokenizer.pm in @INC (@INC contains: c:/perl/site/lib c:/perl/lib .) at C:\www\kak\token.pl line 5.
00:37 <****> is that because of dependencies that I require?
00:38 <****> tobor: looks like you didn't send it a required arg. Be aware that Khisanth is right though - it's there, but it's not documented, and there may be a reason for that
00:39 <****> undocumented things fall under the category of "I can change/remove this whenever I want"
00:39 <****> TMTOWTDlt: What arg, does it need... a template?
00:41 <****> You'd need to read the CGI source to see. However, there may be a better way of doing whatever you're trying to do. What are you trying to do?
00:41 <****> If I need to start fast, and learn perl fast, whre should I look (I have prior experience in other langs), and also perhaps with a focus on sockets, but not necessary
00:41 * CPAN upload: CGI-Application-4.07_02 (+++++) by MARKSTOS
00:41 <****> I only need to learn perl fast...
00:43 <****> TMTOWTDlt: All I'm trying to do is rename the uploaded temp file (in effect moving it), instead of opening it and writing it out to a new file (which is taking up to an hour, cuz some of these uploaded files are over 200 Megs)
00:44 <****> tobor: I question a webserver that takes two hours to copy a 200 meg file. But if you really need it, you'll need to read the source. And be aware that it may go away tomorrow (not likely, but possible)
00:45 <****> TMTOWTDIt: you don't question using HTTP for large uploads? :)
00:45 <****> well maybe with PUT ...
00:45 <****> Nothing like uploading a 200MB file and then seeing "Your session has expired" when the upload finishes.
00:46 <****> Khisanth: Well, that might be second on my list.
00:46 <****> FTP is beyond the scope of these users
00:47 <****> how can i take the lines of the output from grep and iterate over them in perl?
00:48 <****> You can use open.
00:49 <****> open(FOO, "grep Papa /home/dogmeat/smurfnames|");
00:49 <****> no suguestion about a "fast learn path"?
00:50 <****> tyoc: http://learn.perl.org/library/beginning_perl/
00:50 <****> thx
00:50 <****> np
00:56 <****>/; ?
00:56 <****> is it possible to make a telnet connection in perl?
00:56 <****> Yep.
00:56 <****> Gekz: look at Net::Telnet
00:56 <****> dogmeat: sure, that too.
00:56 <****> pravus: thanks :)
00:56 <****> dogmeat: but you said you wanted to iterate. FH is a line-by-line iterator :)
00:57 * CPAN upload: Test-File-1.22 by BDFOY
00:58 <****> tobor: are you sure you have the use tempfile option enabled?
00:59 <****> Khisanth: ahhhh... how would I check that?
00:59 <****> ...
00:59 <****> this sounds like you didn't read the docs for CGI.pm :)
00:59 <****> docs?
01:00 <****> yes, you know doctors
01:00 <****> what's up, perldoc?
01:00 <****> ok... i get it. point made
01:01 <****> GumbyBRAIN: mst3k
01:01 <****> let's hope it sticks
01:01 <****> Hex got a utf-8 politeness crusader i need to get gate annie running in 2k3.
01:01 <****> utf-8 politeness crusader?
01:02 <****> yes, let's hope
01:02 <****> night
01:03 <****> there is also the upload_hook function which would let you skip the moving step
01:04 <****> upload_hook eh... I'll read up on that.
01:04 <****> on the other hand you might not want to move incomplete uploads ;)
01:05 <****> I AM ON A CRUSADE FOR POLITENESS
01:05 * Khisanth spawns a third hand
01:05 <****> caps locked?
01:05 <****> i spotted the font change
01:05 <****> on the third hand if the temp and final locations are on different volumes then the upload_hook would be faster
01:07 * apeiron chops off Khisanth's third hand with a well-sharpened wakizashi.
01:09 <****> A wakiwiki
01:10 <****> GumbyBRAIN: but will it blend?
01:10 <****> Will it blend?
01:10 <****> gumbybrain: will what blend?
01:10 <****> What for that method, the array is not helpful to people that find into an array will it blend?
01:14 <****> a blend of vodka with lychee liqueur is always good
01:14 <****> shaken, not stirred


Total 36 pages. You are browsing page 1/36.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo