460 Posted Topics

Member Avatar for santhanalakshmi
Member Avatar for CoolAtt

Thats not really enough information but try making the match non-greedy by adding '?': (\w:\\.*?\.\w{3})

Member Avatar for CoolAtt
0
90
Member Avatar for mtramnes

That is far from a beginners perl project. Makes no sense you would get a project like that and apparently have no idea how to even start. Step one: Read the CGI modules documentation.

Member Avatar for verruckt24
0
117
Member Avatar for cugetare

Do you understand what the error means? "Can't call method "SaveAs" on an undefined value at Y:/In/FileReport.pl line 183." You have created an object in the perl script at some point that did not return a true value, something like: my $object = FOO->new; then you are trying to use …

Member Avatar for cugetare
0
178
Member Avatar for SergioQ
Member Avatar for KevinADC
0
105
Member Avatar for idbgy

There is no way to know why the download was slow, that has nothing to do with PPM. Either the downlaod site was busy or your DSL providor was busy or your computer might have been overloaded doing other things. PPM does have its negative side but also a positive …

Member Avatar for idbgy
0
268
Member Avatar for Samudra2008
Member Avatar for rastaberry

THere is no one size fits all answer. Depends on your overall requirements not just the part you posted. Can perl do what you asked about? I am sure it can. Would it be easy? Not if you don't know any perl.

Member Avatar for rastaberry
0
105
Member Avatar for localp

There are other ways, but here is one: [CODE]my $string = 'address=no+3%2C+oxford+street'; (my $key,$value) = split(/=/,$string); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; print $value;[/CODE]

Member Avatar for KevinADC
0
90
Member Avatar for localp

The standard way is to use the CGI modeule that comes with perl. [url]http://perldoc.perl.org/CGI.html[/url]

Member Avatar for KevinADC
0
67
Member Avatar for KevinADC

Daniweb.... please remove all the stupid comments posted by sultan6928 in this code snippet: [url]http://www.daniweb.com/code/snippet631.html[/url] Thanks

Member Avatar for Dani
0
94
Member Avatar for it2051229

Yes, with perl this should not be a problem although it does help to properly declare variables within the intended scope of their use using "my", "our", or "local" when and where appropriate. As ithelp has said, in perl they are called references. They are mostly used to create complex …

Member Avatar for KevinADC
0
98
Member Avatar for cardanadam
Member Avatar for yair7190

When you use print, you should quote strings. print reverse <>, "history.txt > history_rev.txt\n"; On the other hand, if you are expecting perl to know those are input and output files you must not have been awake in perl class. ;)

Member Avatar for yair7190
0
163
Member Avatar for idbgy

You need to install DBI and DBD::mysql. Open the activestate/activeperl folder that was created on the hard drive when you install activeperl and open the documentation. Read the PPM directions which is what you use to install and manage modules with activeperl. Then see this thread on another forum: [url]http://bytes.com/forum/thread840298-install+dbd%3A%3Amysql.html[/url]

Member Avatar for KevinADC
0
326
Member Avatar for ealion

[QUOTE=ealion;729768]1. I can't get a stable and full version of Perl. 2. Need help in developping an FTP application and INVOICING application under PERL. Tx.[/QUOTE] You can get perl from many sources, there is no reason to not be able to get a working distribution of perl. If you need …

Member Avatar for jbennet
0
80
Member Avatar for poojapo

Kelicula, the thread is over a year old..... PS: i added a comment to both of your recent code snippets if you are interested.

Member Avatar for KevinADC
0
81
Member Avatar for reno02

"it doesn't work" is too vague. Any error messages? What does it do? Is Mail::Sendmail installed? Use code tags to post code.

Member Avatar for reno02
0
125
Member Avatar for Narayanank

with a CGI script it often means you tried to print something to the screen or perl tried to print something to the screen, like an error message, before the http header was printed. See your other thread, that is probably where the error is occuring. You had the shebang …

Member Avatar for haonamdaica
0
102
Member Avatar for mruane

Activeperl is perl, it is the compiler. The biggest difference, I guess, is that Windows does not use the shebang line to find perl. You open a text editor and write some perl code and save it to your hard drive. To run it open a DOS windows and at …

Member Avatar for orko
0
138
Member Avatar for annie_singh

Don't bother, they have been given the answer on another forum: [url]http://www.perlguru.com/gforum.cgi?post=32920[/url]

Member Avatar for KevinADC
0
863
Member Avatar for it2051229

If you're using Windows you would use activestate activeperl (see Salems post above), its the easiest way to get perl on your windows computer. If you want to do CGI script you may also want to install an HTTP server. Apache is free ([url]www.apache.org[/url]) or you can try using your …

Member Avatar for KevinADC
0
179
Member Avatar for reno02

This is wrong: <FORM ACTION="http://cgi-bin/xxxx.cgi" method=POST> probably should be: <FORM ACTION="cgi-bin/xxxx.cgi" method=POST> You also need a </select> tag: <SELECT NAME="Type"> <OPTION VALUE="c_fah">Convert from Celsius to Fahrenheit<BR/> <OPTION VALUE="f_cel">Convert from Fahrenheit to Celsius<BR/> </SELECT> besides that it looks like the script should work.

Member Avatar for KevinADC
0
98
Member Avatar for arunprakash647

What data do you pass into the function? Which module are you using that imports the timegm() function?

Member Avatar for KevinADC
0
691
Member Avatar for samuelo
Member Avatar for KevinADC
0
97
Member Avatar for it2051229

The short answer is no. Perl has no builtin function that checks if a character is an alpha character.

Member Avatar for KevinADC
0
58
Member Avatar for talk2mishal

You have this same incomprehensible question on several perl forums. I assume English is not your native language, but you still have to ask a question that we can understand. Besides telling you to read the CGI.pm documentation like you have been told on two forums, there is no way …

Member Avatar for KevinADC
0
97
Member Avatar for aanya

You have this posted on too many forums for me to want to help you. You should also try and do your own school work.

Member Avatar for aanya
0
134
Member Avatar for perltoday

[CODE]opendir (DIR, "path/name of directory") or die "$!"; while(my $file = readdir(DIR)) { next if ($file eq '.' || $file eq '..'); open (my $FH, "path/name of directory/$file") or print "$!\n"; while (my $line = <$FH>) { do something with $line } close $FH; } } closedir DIR;[/CODE]

Member Avatar for KevinADC
0
120
Member Avatar for PPP1

[QUOTE=PPP1;704112]Hello, Please tell me the form of Perl.[/QUOTE] high on the ends, low in the middle.

Member Avatar for perltoday
0
74
Member Avatar for perltoday

Yes, it sounds possible if I understand your question. A programing language would be useless if it were unable to read/write to files.

Member Avatar for KevinADC
0
50
Member Avatar for artemis_f

@branch is an array of arrays in the perl code. It is a global variable in the above code, but global only to that perl script. Its a lexical variable that is scoped to the entire script so in essence it is global, but still only global to that script. …

Member Avatar for KevinADC
0
478
Member Avatar for annie_singh

[CODE]open (IN, "filename.pdb") or die "$!"; while (my $line = <IN>) { chomp($line); my @array = (split(/\s+/,$line))[6,7,8]; print "@array\n"; } close (IN);[/CODE] Look into perls math operators for the distance calculations. The above just shows an example of how to get the last three columns from a line with 9 …

Member Avatar for KevinADC
0
522
Member Avatar for koteswarvijay
Member Avatar for viktorijakup
Member Avatar for KevinADC
0
151
Member Avatar for klactose

You could try using a reference to a function. [CODE]sub some_function { print "foo"; } my $some_function = \&some_function;[/CODE] You can pass $some_function like any other scalar, but you need to use the arrow operator to run the function. [CODE]$some_function->()[/CODE] Assuming you pass references to functions to your sub rotuine: …

Member Avatar for klactose
0
121
Member Avatar for 115cruiser

grep is OK in this situation because you have to search the entire file. grep uses "$_ =~ m/pattern/" internally to search for the pattern. When you say search for multiple things in the file, how does the user input those multiple things? You have to tell the user something …

Member Avatar for 115cruiser
0
104
Member Avatar for jyotiu
Member Avatar for yair7190
Member Avatar for yair7190
0
103
Member Avatar for navsaug

This guy posted on a number of forums and already has a solution, he will not be coming back here to read your response.

Member Avatar for katharnakh
0
81
Member Avatar for sobam15
Member Avatar for uan_Blr

post some sample input data and desired output data. If you want to continue with awk you should take this discussion to an awk forum. Perl has very similar command line syntax to awk and could be done as a command line/one-liner if you really wanted to do that. one-liners …

Member Avatar for uan_Blr
0
519
Member Avatar for bhall

You seem to have skipped the basics of perl. The biggest problem is using single-quotes around your scalar variables, which will not interpolate them but treat them as literal strings. You almost never quote a lone scalar variable anyway. Assuming $data[0] and $data[1] are properly defined: [CODE]my %stuff = (); …

Member Avatar for KevinADC
0
128
Member Avatar for SNN
Member Avatar for tonydm

"pack" and "unpack" have lots of templates used for this type of conversion of one thing into another thing. I don't know if they can do what you want, but that is a starting place anyway.

Member Avatar for tonydm
0
178
Member Avatar for katharnakh

Sorry, I have no experience using threads. If you get no further replies here ask on [url]www.perlmonks.com[/url]

Member Avatar for katharnakh
0
129
Member Avatar for knarffrank

Some people on this forum are like that, but I am not a student nor am I from a second-world country, although it is debateable since the USA is going down the tubes pretty fast.

Member Avatar for KevinADC
0
104
Member Avatar for Vandithar

Open an editor and start writing code and testing the results is how you start. School work?

Member Avatar for raul15791
0
91
Member Avatar for chanderk
Member Avatar for raul15791
0
106
Member Avatar for Vandithar

[CODE]if (/RNA[ -]?binding protein/) { do somethihng }[/CODE] ? is a quantifier which means zero or one, its the same as: [CODE]if (/RNA[ -]{0,1}binding protein/) { do somethihng }[/CODE] Look up "quantifiers" in a regular expression tutorial.

Member Avatar for jephthah
0
269

The End.