Re: Chopping a string.

2002-07-19 Thread Bud Rogers
art, $length) > For example I have a string: > > $line = "Microsoft is a big company and I love Bill Gates"; > And I want to cut it to become: > > $line = "Microsoft is a big..."; $line = substr($line, 0, 18) . "..."; Length of 20 goes to the c in

Re: .csv file to .tab file?

2002-03-26 Thread Bud Rogers
Brian Volk wrote: > Is there a way to covert a .csv file to .tab file? I would do something like this. while (<>) { @fields = split(/,/, $_); $line = join("\t", @fields); print $line; } You could do all that on one line, but I prefer readabili

Re: CGI perl html urgent

2002-01-07 Thread Bud Rogers
Prahlad Vaidyanathan wrote: > Does emacs do syntax highlighting ? I've been using Vim for a very > long time now, but last time I checked Emacs didn't do it. Xemacs does. IMO not as good as Vim, but very good nonetheless. It's been a very long time since I used Emacs, but I'm pretty sure it d

Re: A couple of questions!

2002-01-05 Thread Bud Rogers
Marvin Bonilla wrote: > The first line has the hour that this report was origined, the > information that I need is the line where appears "Acct-Session-Time = > 5275" but just from the 08:00 to 19:00, and them sum the numerical > value. > > I can get the hour (with while and split functions) bu