Search Results

Showing results 1 to 40 of 42
Search took 0.01 seconds.
Search: Posts Made By: Salem ; Forum: Perl and child forums
Forum: Perl Sep 16th, 2009
Replies: 3
Views: 618
Posted By Salem
Generate 1 digit, in a loop which runs 8 times.
Forum: Perl Sep 13th, 2009
Replies: 1
Views: 491
Posted By Salem
It would take 5 seconds for you to try it - so why haven't you?
Forum: Perl Jun 29th, 2009
Replies: 5
Views: 446
Posted By Salem
Well the 'my' exists inside a { } scope, so I guess it goes out of scope when the block exits.
Forum: Perl Jun 29th, 2009
Replies: 5
Views: 446
Posted By Salem
- did you actually open the file?
- does the file you actually opened contain any data?
- does another approach to reading the same file yield data?

3 lines out of context, and an...
Forum: Perl Jun 3rd, 2009
Replies: 2
Views: 1,131
Posted By Salem
http://forums.devshed.com/perl-programming-6/regular-expression-to-get-multi-line-comment-615434.html
Getting kinda bored with your approach.
Forum: Perl Jan 28th, 2009
Replies: 7
Views: 1,005
Posted By Salem
Well we could guess, or you could post code.
Forum: Perl Jan 28th, 2009
Replies: 7
Views: 1,005
Posted By Salem
So are you in control of either the producer or consumer, source code wise?

Is the producer a perl script?
Forum: Perl Jan 26th, 2009
Replies: 4
Views: 614
Posted By Salem
One while loop to input a guess, then 3 tests.
Forum: Perl Jan 4th, 2009
Replies: 3
Views: 1,160
Posted By Salem
http://clusty.com/search?query=calling+c+from+perl&sourceid=Mozilla-search
Forum: Perl Dec 21st, 2008
Replies: 11
Views: 1,624
Posted By Salem
> Im trying to secure a php through a CGI, which will provide a password to the script instead of loading it from a file
Most people seem to use https to establish a secure connection between the...
Forum: Perl Dec 21st, 2008
Replies: 11
Views: 1,624
Posted By Salem
If you've got a secret, then hiding it in the source code will not work.

a) you don't know how long it will be before someone cracks it.
b) worse, you don't know how long they knew how to crack...
Forum: Perl Dec 21st, 2008
Replies: 11
Views: 1,624
Posted By Salem
> I plan to distribute it and it would be a security issue if the source code got out
Security through obscurity isn't...
Forum: Perl Dec 18th, 2008
Replies: 9
Views: 756
Posted By Salem
Forum: Perl Dec 18th, 2008
Replies: 9
Views: 756
Posted By Salem
You also need to print the result, say

print "$_";
Forum: Perl Dec 14th, 2008
Replies: 2
Views: 865
Posted By Salem
http://www.perl.org/ and a Camel Book (http://oreilly.com/catalog/9780596000271/)

First thing you need to search for is all about the array @ARGV
Forum: Perl Oct 24th, 2008
Replies: 3
Views: 621
Posted By Salem
http://clusty.com/search?input-form=clusty-simple&v%3Asources=webplus&query=xampp+internal+server+error
Forum: Perl Oct 7th, 2008
Replies: 5
Views: 1,314
Posted By Salem
Is this you as well?
http://www.daniweb.com/forums/thread148485.html
Forum: Perl Oct 5th, 2008
Replies: 4
Views: 1,733
Posted By Salem
http://www.activestate.com/Products/languages.mhtml
Perl is a scripting language, more akin to PHP than C

Whilst you can do web stuff in perl, it is a general purpose programming language which...
Forum: Perl Oct 3rd, 2008
Replies: 3
Views: 817
Posted By Salem
Read this first - http://www.catb.org/~esr/faqs/smart-questions.html
Forum: Perl Oct 2nd, 2008
Replies: 5
Views: 1,705
Posted By Salem
Open each one of them in turn?
Or open many of them at once?
- Because there are limits to how many files you can have open at the same time

If you list the files on the command line, then...
Forum: Perl Oct 2nd, 2008
Replies: 5
Views: 1,705
Posted By Salem
Sure,
open F1,...
open F2,...

then
aLine = <F1>
anotherLine=<F2>

and so on
Forum: Perl Oct 1st, 2008
Replies: 5
Views: 1,911
Posted By Salem
> my exiting code:
Really....
http://www.daniweb.com/forums/post702120-2.html
Try to reply to existing threads which cover basically the same topic as before.

In your loop, having worked out...
Forum: Perl Sep 30th, 2008
Replies: 2
Views: 2,072
Posted By Salem
Well \d+\.\d+ would match a single floating point number in non-scientific format.
Forum: Perl Sep 17th, 2008
Replies: 1
Views: 2,547
Posted By Salem
Sure, you should be able to do something like that.
Forum: Perl Sep 4th, 2008
Replies: 11
Views: 3,004
Posted By Salem
I don't see why you need to read the whole file in, or store the whole file before writing it out.


while ( <FH> ) {
chomp;
my @f = split; # splits $_ at white-space
print DAT $f[0] ....
Forum: Perl Sep 3rd, 2008
Replies: 11
Views: 3,004
Posted By Salem
Replace
file.txt
with
*.txt

awk reads the file even more implictly than perl does. So implicitly in fact that you don't have to say anything at all.
Forum: Perl Sep 3rd, 2008
Replies: 11
Views: 3,004
Posted By Salem
http://en.wikipedia.org/wiki/Awk

> how do i use it?
About the same as you would perl, except you type 'awk' instead of 'perl'

Along with 'sed' and 'grep', they form a family of text processing...
Forum: Perl Sep 3rd, 2008
Replies: 11
Views: 3,004
Posted By Salem
Dead easy in awk (Perl's baby sibling)
Assuming these are comma separated value files,
awk -F, '{ print $1 "," $6-$10 }' file.txt
Forum: Perl Aug 23rd, 2008
Replies: 1
Views: 1,533
Posted By Salem
http://cpan.uwinnipeg.ca/dist/Convert-ASN1
Perhaps?
Forum: Perl Aug 19th, 2008
Replies: 13
Views: 1,642
Posted By Salem
I think what the OP is trying to get at is that the input text, AND the query are both free-form user input.

Crafting specific RE's to deal with the example text and "RNA binding protein", whilst...
Forum: Perl Aug 17th, 2008
Replies: 13
Views: 1,642
Posted By Salem
> I don't know how to write a regular expression such that this $word should satisfy both the
> conditions(i.e "RNA-binging protein" and "RNA binding protein") and both these sentences
> should be...
Forum: Perl Aug 16th, 2008
Replies: 13
Views: 1,642
Posted By Salem
http://faq.perl.org/perlfaq6.html#How_can_I_do_approxi
Forum: Perl Aug 13th, 2008
Replies: 3
Views: 772
Posted By Salem
> Both of my files are huge and to run this program it takes more than an hour
> so I was wondering if there is a better way to do this.
So you run it, then go have lunch, or find something else to...
Forum: Perl Jul 6th, 2008
Replies: 1
Views: 2,683
Posted By Salem
http://perldoc.perl.org/functions/unpack.html
and
http://perldoc.perl.org/functions/pack.html
Forum: Perl Aug 14th, 2007
Replies: 4
Views: 3,480
Posted By Salem
The ! character is the default history modifier used by the bash shell (and nothing to do with perl). ! followed by all sorts of things, does all sorts of things.

Eg.
ls file.pl
cat !$
!$...
Forum: Perl Jun 16th, 2007
Replies: 2
Views: 1,211
Posted By Salem
Are you using something like this to parse your XML?
http://search.cpan.org/~msergeant/XML-Parser/
Forum: Perl Jun 16th, 2007
Replies: 12
Views: 4,487
Posted By Salem
I'm not even going to pretend that you haven't read
http://www.daniweb.com/forums/announcement112-3.html
Edit your post so your code is readable, and not munged by smilies and zero indentation...
Forum: Perl Jun 15th, 2007
Replies: 12
Views: 4,487
Posted By Salem
Ok, before everyone gets bored with yet another round of "20 questions", do you use some pre-defined API to get a file for you, even if you're not directly responsible for opening files?

Have you...
Forum: Perl Jun 14th, 2007
Replies: 12
Views: 4,487
Posted By Salem
First random guess is you've reached the max number of open files you're allowed to have because you're not closing any of them.
Forum: Perl May 25th, 2007
Replies: 3
Views: 6,478
Posted By Salem
Read about "@*" in the perlform manual page.
http://perldoc.perl.org/perlform.html
Showing results 1 to 40 of 42

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC