460 Posted Topics
Re: hehehe... the forum moderator letting the forum members (at least the ones that couldn't figure it out) know how to defeat the file attachment restrictions. :) As you can see, it's not a very sophisticated MIME checking routine. :D | |
![]() | Re: maybe the expect module is what you need: [url]http://search.cpan.org/~rgiersig/Expect-1.20/Expect.pod[/url] but you need to use Cygwin. See the above link. ![]() |
Re: technically, as far as I know, it is OK. In general I would say it's not good practice unless it's clear why you needed to do that or put comments in the code explaining why you are doing that. Like in the CGI module you will see a sub routine … | |
Re: that really looks like query string data, in which case the CGI module could be used to get you name value pairs into your script for further use. | |
Re: windows does not read/use the shebang line. I don't tknow what the work-around would be for this problem. It works with the http server (apache at leat) because apache for windows does some kind of unix/shebang line emulation. | |
Re: Do you mean you want the perl code embedded in the html code (sort of like php)? Search google for: "embedded perl" | |
Re: If you are running windows you want to install activestate perl [url]http://www.activestate.com/Products/ActivePerl/?mp=1[/url] this article might help but I don't know which version of apache the article is written for: [url]http://www.thesitewizard.com/archive/addcgitoapache.shtml[/url] | |
Re: you might want to post that question on the perlmonks site to get answers. | |
Re: this should be in the shell scripting forum: [url]http://www.daniweb.com/techtalkforums/forum113.html[/url] | |
Re: [url]http://learn.perl.org/library/beginning_perl/[/url] search google for more perl tutorials and references on the internet | |
Re: look into the Win32 family of modules for doing things in windows with perl. probably Win32::Process | |
Re: some of perls native functions are also meant for Unix, such as flock() and chmod() and some functions might return a different value depending on the operating system, like stat(). | |
Re: no host supports chmoding files externally. You have to connect to the server somehow: telnet/shell, FTP, another script, to change permission of files on a server. | |
![]() | Re: if the file isn't too big this might do what you want: [code] open(FH,'file.txt'); my $data = do {local $/; <FH>}; my @data = split(/\|\|\|/,$data); print "$_\n" for @data; [/code] |
Re: [QUOTE=Mushy-pea;275340]Hello everyone. I've run into a problem with regular expressions; the extraction "variables" ($1, $2, $3 etc.) are read only and scoped to the current block. If you need to do two regex extraction operations in the same block, is there a way to reset the ($1, $2, $3 etc.) … | |
Re: you're using the wrong brackets on your hash keys, you use {} not () [CODE]sub test_function { my($key, %table); %table = ('word1', 'Perl', 'word2', 'is', 'word3', 'great'); $key = "word3"; print $table{'word1'}; print $table{"word2"}; print $table{$key}; }[/CODE] not sure what tutorials you have read but if they are telling you … | |
Re: look intot these operators/functions and decide which is best for your purposes: system - runs a program but doesn't return program output to the perl script. Returns exit status, if any, of run program instead. exec - runs a program but exits the perl program as soon as it's called … | |
Re: The status code should be the first line of all http response headers. You must also include a content-type line in the header. If you are using the CGI module you can use the cgi_error method to get any errors the script reports and inlcude them in headers. See the … | |
Re: Not sure where you got that regexp from but it's either a typographical error or just wrong. The first '[' is doing nothing unless it's literally part of the search pattern. It's also not tied to the beginning of the string. The '^' is the beginning of string anchor but … | |
Re: iblair, Are you sure you need to use the -h option? All it does is list the valid options. What is it you are trying to do? | |
Re: with windows 98, open a DOS window (MS-DOS prompt) and cd\ if necessary to get out of the windows directory. Then type in: c:\perl\bin\perl.exe name_of_script.pl or if perl is in the command path: perl name_of_script.pl and press the enter key. The script will run and the output will remain on … | |
Re: parsing user input for all possible syntax variations is an excersize in frustration as Matts code above shows. If you want to simply find "pi=3.14" a turn it into 3.14: [CODE]s/pi=3\.14/3.14/g;[/CODE] or if 'pie=3.14' is a possibility too: [CODE]s/pie?=3\.14/3.14/g;[/CODE] and last, if case sensitive matching is not wanted: [CODE]s/pie?=3\.14/3.14/ig; [/CODE] | |
Re: It sounds to me like you are trying to do something the hard way. Why would you need to write some new data over old data instead of using a delimited flat file or a real database? | |
Re: Maybe some trick involving frames or an iframe? | |
Re: Sorry, but your question is out of my range of knowledge and experience. A question of this nature might be best asked on the perlmonks website. | |
Re: You know you're getting then when you can answer your own questions! :) | |
Re: whats the value of $timeout? unless($scp->expect([B]$timeout[/B],-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){ | |
Re: you don't need to make a copy of the array referenced by a reference to use it. But you need to make a copy if you don't want the original variable the reference points to to be affected. [QUOTE]I'd like to know why $REF_DREF_A != $REF_DREF_B [/QUOTE] because they are … | |
Re: has to be like installed like this: perl\site\lib\Term\Readkey.pm | |
Re: There are a few ways to get the date/time with perl: [URL]http://perldoc.perl.org/functions/gmtime.html[/URL] [URL]http://perldoc.perl.org/functions/localtime.html[/URL] [URL]http://perldoc.perl.org/functions/time.html[/URL] or you can use backtiks to get the date from the system date function, something like: [code][COLOR=Black]my $date = `/bin/date +"%a, %b %d, %Y"`;[/COLOR][/code] | |
Re: I don't understand what that sub routine does or what you are asking. Please explain your question some more. | |
Re: [CODE]$datos .= qq~<a href="$me?C=OFERTAS2&EMPRESA=$empresa_param&NREF=$nref" onMouseOver="linkFTecnica(nref2)">~;[/CODE] | |
Re: variables always change when you redefine them or use operators or functions on them. Not sure what your question is. | |
Re: [QUOTE]I think I need to do something to make the new tty the controlling terminal for the forked process but cannot find out what it is I need to do.[/QUOTE] I personally have no idea how to do that. If you get no answers here you may want to post … | |
Re: [QUOTE=msvinaykumar]Hi, How to convert excel to html in shell prompt Is there any unix command to do this ? so that I can use that in excel Vinay[/QUOTE] Why are you asking this question in the perl forum? You should ask in a shell scripting/unix forum. | |
Re: I think the problem with this line: require Oogaboogoo::date; is that the :: is a directory path, which is why you get the error message: Can't locate Oogaboogoo/date.pm rename the module to 'date.pm' and put it in the Oogaboogoo directory and I think it will work. | |
in the code snippets perl syntax highlighter, this regexp: [CODE]$string =~ s/^\s+//;[/CODE] the first 's' after the '=~' operator is correctly linked to the perldoc page concerning the 's' function, the second 's' however is also linked to the same page, which is not correct since it is the meta … | |
Re: You need to print an http header when running scripts in a CGI environment: 1: #!/usr/bin/perl 2: 3: $cr = '???'; 4: $decrypted ="Something"; 5: $decrypted =~ s/$cr/\r/g; 6: print "Content-type: text/html\n\n"; 7: print $decrypted; use a better subject line in the future. "Please Help Me!!! P E R L!!!" … | |
Re: your post is really much too long, probably nobody is going to read all that. My questiojn to you is have you tried the code? Did it work or not? Any error messages if it did not work? | |
Re: does excel have a native command for "save as csv"? ![]() | |
the Perl syntax highlighter is mangling some perl code, for example, this line: [CODE]my(undef, undef, $ftype) = fileparse($file,qr{\..*});[/CODE] using the perl syntax highlighter (which I guess does not work in this forum) the backslash in [B]qr{\..*}[/B] is removed, and becomes [B]qr{..*}[/B] which is no longer the correct code for the … | |
Re: [QUOTE]1. Get perl to recognize the difference between a file and a sub-directory[/QUOTE] File test operators are your friend: [url]http://perldoc.perl.org/functions/-X.html[/url] | |
Re: piss anybody reply me? I'd rather not be pissed on so I will not reply, so please do not pisssssssssss, thank you. | |
Re: You will have to use whatver zipping tool is installed on the remote machine if you want to zip the file while it still resides on the remote machine. | |
Re: mkdir() [url]http://perldoc.perl.org/functions/mkdir.html[/url] although using File::Path does have advantages and it's a core module so nothing to install: [url]http://perldoc.perl.org/File/Path.html[/url] | |
Re: I have personally never installed it but here is the link to the FTS site on sourceforge: [url]http://openfts.sourceforge.net/[/url] |
The End.