User Profile

Collapse

Profile Sidebar

Collapse
dtex23
dtex23
Last Activity: Nov 15 '07, 09:29 PM
Joined: Nov 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dtex23
    replied to php.ini seems broken
    in PHP
    Thank you, thank you, THANK YOU!

    I usually use ssi and perl, php is kinda new, didn't realize that short tags were bad. Is there a reason they are off?...
    See more | Go to post

    Leave a comment:


  • dtex23
    started a topic php.ini seems broken
    in PHP

    php.ini seems broken

    Hello,

    Quick and somewhat stupid question. I have a functioning installation of PHP with apache 1.3.36 (when I <?phpinfo();? >, it works).

    However, when I provide a specific configration file (or even the backup copy at php.ini-reccomended), phpinfo() stops working. My first guess is that I did something horrible to the .ini files, but I can't seem to find a way to test them, nor a system backup. I would really...
    See more | Go to post

  • dtex23
    replied to Question about LHS assignment with split()
    in Perl
    No problem, just looking for ease of maintenance...
    See more | Go to post

    Leave a comment:


  • dtex23
    replied to Question about LHS assignment with split()
    in Perl
    Sorry... $inv is the actual line from the program (I didn't generic it to $line).

    For what it's worth, the actual lines read something like
    part number|location |description

    What I have been worried about thru the whole affair is the ability to change it to something like
    part number|location |description|qu antity...
    See more | Go to post

    Leave a comment:


  • dtex23
    replied to Question about LHS assignment with split()
    in Perl
    Whoops, one too many lines!

    delete this:
    [CODE=perl]%lhs = map { $_ => ''; } @LHS;
    %lhs = map { $_ => split (/\|/, $line); } @LHS;[/CODE]

    When using split(), it was the only way to avoid the map function returning something like
    [CODE=perl]$hash{'var1'} = $var2
    $hash{'var3'} = $var4[/CODE]

    From out on Google, I can see *how* this happens, but am not sure of the *why*.
    See more | Go to post
    Last edited by eWish; Nov 5 '07, 10:48 PM. Reason: Added Code Tags

    Leave a comment:


  • dtex23
    replied to Question about LHS assignment with split()
    in Perl
    OK, using code that looks alot like this:

    Code:
      @LHS = qw/var1 var2 var3 varn/;
      %lhs = map { $_ => ''; } @LHS;
    
      my @temp = split(/\|/, $inv);
      my $i = 0;
      foreach $lhs (@LHS) {
        $split{$lhs} = $temp[$i];
        $i++;
    }
    I got the program working.... but the solution with the temp array and iteration over it seems so inelegant. The program still...
    See more | Go to post

    Leave a comment:


  • dtex23
    replied to Question about LHS assignment with split()
    in Perl
    It doesn't really matter what type is used. All I am looking for it the ability to have (the array of stuff) on the LHS be set from a file somewhere because the call is used in several diff. programs, and going like
    ($hash{'var1'}, $hash{'var2'}, etc.)
    leaves me in the same boat, no?...
    See more | Go to post

    Leave a comment:


  • dtex23
    started a topic Question about LHS assignment with split()
    in Perl

    Question about LHS assignment with split()

    Good afternoon all,

    Question about list assignment in perl...

    Given a piece of code that looks kinda like this for parsing some '|' delimited input text lines :
    [CODE=perl]($var1, $var2, $var3) = split(/\|/, $listline);[/CODE]

    Here's the hard part: There are differing programs that read from the same conf file that take data stream and split it, but at some point in the future I may need to expand...
    See more | Go to post
    Last edited by eWish; Nov 4 '07, 04:35 PM. Reason: Removed Email Address & Added Code Tags
No activity results to display
Show More
Working...