Forum: Perl Jan 28th, 2009 |
| Replies: 7 Views: 955 Well we could guess, or you could post code. |
Forum: Perl Jan 28th, 2009 |
| Replies: 7 Views: 955 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 One while loop to input a guess, then 3 tests. |
Forum: Perl Oct 7th, 2008 |
| Replies: 5 Views: 1,299 Is this you as well?
http://www.daniweb.com/forums/thread148485.html |
Forum: Perl Sep 4th, 2008 |
| Replies: 11 Views: 2,817 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 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 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 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 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 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 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 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. |