Search Results

Showing results 1 to 12 of 12
Search took 0.01 seconds.
Search: Posts Made By: Salem ; Forum: Perl and child forums
Forum: Perl Jan 28th, 2009
Replies: 7
Views: 955
Posted By Salem
Well we could guess, or you could post code.
Forum: Perl Jan 28th, 2009
Replies: 7
Views: 955
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: 589
Posted By Salem
One while loop to input a guess, then 3 tests.
Forum: Perl Oct 7th, 2008
Replies: 5
Views: 1,299
Posted By Salem
Is this you as well?
http://www.daniweb.com/forums/thread148485.html
Forum: Perl Sep 4th, 2008
Replies: 11
Views: 2,817
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: 2,817
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: 2,817
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: 2,817
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 14th, 2007
Replies: 4
Views: 3,411
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: 12
Views: 4,404
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,404
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,404
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.
Showing results 1 to 12 of 12

 


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

©2003 - 2009 DaniWeb® LLC