460 Posted Topics

Member Avatar for vegaseat

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

Member Avatar for KevinADC
0
55
Member Avatar for aetinti

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.

Member Avatar for aetinti
0
82
Member Avatar for concept
Member Avatar for Mushy-pea

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 …

Member Avatar for zabina
0
217
Member Avatar for bhavna_816

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.

Member Avatar for bhavna_816
0
84
Member Avatar for Mushy-pea

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.

Member Avatar for KevinADC
0
90
Member Avatar for bhavna_816

Do you mean you want the perl code embedded in the html code (sort of like php)? Search google for: "embedded perl"

Member Avatar for KevinADC
0
109
Member Avatar for dss
Re: Cgi

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]

Member Avatar for KevinADC
0
299
Member Avatar for Mushy-pea

you might want to post that question on the perlmonks site to get answers.

Member Avatar for KevinADC
0
90
Member Avatar for jaguar founder
Member Avatar for crestaldin

this should be in the shell scripting forum: [url]http://www.daniweb.com/techtalkforums/forum113.html[/url]

Member Avatar for masijade
0
163
Member Avatar for mahe4us

[url]http://learn.perl.org/library/beginning_perl/[/url] search google for more perl tutorials and references on the internet

Member Avatar for Puckdropper
0
163
Member Avatar for kathas
Member Avatar for Bhaskar_korthi

look into the Win32 family of modules for doing things in windows with perl. probably Win32::Process

Member Avatar for KevinADC
0
60
Member Avatar for kararu

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().

Member Avatar for MattEvans
0
96
Member Avatar for MDGM

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.

Member Avatar for MattEvans
0
110
Member Avatar for perlguy

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]

Member Avatar for KevinADC
0
71
Member Avatar for Mushy-pea

[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.) …

Member Avatar for Mushy-pea
0
140
Member Avatar for Mushy-pea

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 …

Member Avatar for Mushy-pea
0
111
Member Avatar for kamleshpdude

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 …

Member Avatar for MattEvans
0
96
Member Avatar for MattEvans

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 …

Member Avatar for KevinADC
0
122
Member Avatar for cms271828

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 …

Member Avatar for KevinADC
0
127
Member Avatar for iblair

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?

Member Avatar for KevinADC
0
571
Member Avatar for 001

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 …

Member Avatar for MattEvans
0
682
Member Avatar for Puckdropper

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]

Member Avatar for Puckdropper
0
108
Member Avatar for Mushy-pea

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?

Member Avatar for MattEvans
0
341
Member Avatar for MattEvans
Member Avatar for kararu

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.

Member Avatar for KevinADC
0
99
Member Avatar for MattEvans
Member Avatar for EnderX

whats the value of $timeout? unless($scp->expect([B]$timeout[/B],-re=>'[Pp]assword.*?:|[Pp]assphrase.*?:')){

Member Avatar for masijade
0
138
Member Avatar for MattEvans

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 …

Member Avatar for KevinADC
0
136
Member Avatar for RAGHAVENDRAS
Member Avatar for KevinADC
0
124
Member Avatar for Mushy-pea

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]

Member Avatar for lordspace
0
96
Member Avatar for Mushy-pea

I don't understand what that sub routine does or what you are asking. Please explain your question some more.

Member Avatar for Mushy-pea
0
117
Member Avatar for LindaF

[CODE]$datos .= qq~<a href="$me?C=OFERTAS2&EMPRESA=$empresa_param&NREF=$nref" onMouseOver="linkFTecnica(nref2)">~;[/CODE]

Member Avatar for vonfeldt
0
101
Member Avatar for kararu

variables always change when you redefine them or use operators or functions on them. Not sure what your question is.

Member Avatar for masijade
0
133
Member Avatar for sut

[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 …

Member Avatar for sut
0
92
Member Avatar for msvinaykumar

[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.

Member Avatar for KevinADC
0
228
Member Avatar for eishbut

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.

Member Avatar for KevinADC
0
110
Member Avatar for KevinADC

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 …

Member Avatar for Dani
0
121
Member Avatar for SKJoy2001

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!!!" …

Member Avatar for KevinADC
0
159
Member Avatar for metabo_man

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?

Member Avatar for KevinADC
0
239
Member Avatar for droolin
Member Avatar for KevinADC

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 …

Member Avatar for Dani
0
784
Member Avatar for whitetigereyes

[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]

Member Avatar for KevinADC
0
243
Member Avatar for sujagr8

piss anybody reply me? I'd rather not be pissed on so I will not reply, so please do not pisssssssssss, thank you.

Member Avatar for netburst
0
110
Member Avatar for msvinaykumar
Member Avatar for V KUMAR

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.

Member Avatar for KevinADC
0
250
Member Avatar for bigfoot_80906

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]

Member Avatar for KevinADC
0
237
Member Avatar for sujagr8

I have personally never installed it but here is the link to the FTS site on sourceforge: [url]http://openfts.sourceforge.net/[/url]

Member Avatar for KevinADC
0
54

The End.