chmod -- chomp not chmod!!

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Re: chmod -- chomp not chmod!!

    Oh-oh - there was a mistake - I tried chomp, not chmod..
    How do I use chomp correctly? I have an array of strings, want to cut
    off the last \n in each line and use the rest of the line. (concatenate
    it to another string)
    Jane
    > Hi all!
    >
    > I like to read several rows out of two different table-files and put them successively in a new file by:
    >
    > @ergebnis_alles[$#ergebnis_alles+1] = @whole_data1[$l] . $whole_data2[$m];
    >
    > Anything works fine, except that I can't delete the ending newline in the lines in the first tables. So the data is put in two following lines and not successively in one line. I tried chmod, but got error-messages.
    >
    > Whole part of code is:
    > foreach $el1 (@strings1) { $m=0;
    > foreach $el2 (@strings2) {
    > if ($el1 eq $el2)
    > {@strings3[$#strings3+1] = $el1;
    > @ergebnis_alles[$#ergebnis_alles+1] = @whole_data1[$l] . $whole_data2[$m];
    > }
    > else
    > {.....
    > }
    > $m=$m+1;
    > }
    > $l=$l+1;
    > }
    >
    > greetings
    > Jane
    Oh-oh - there was a mistake - Itried chomp, not chmod..


    Christiane Nerz Guest

  2. Similar Questions and Discussions

    1. Chmod permissions
      Hi, Could you please help me with chmod permissions. What are the minimum Unix file/folder permissions required for working with contribute?...
    2. NET::FTP problem w/CHMOD
      Hi I am trying to use the NET::FTP module to recursively chmod files. Either of these two ways of telling the server to chmod it seem to work: ...
    3. php chmod?
      say i have a php script that i access via the web and that creates a file whose permissions are changed to 600 (ie. only the owner can read or...
    4. chmod
      Hi all! I like to read several rows out of two different table-files and put them successively in a new file by: @ergebnis_alles = ...
    5. Undo chmod u+s `which kppp`
      I am using RedHat Linux 9 and entered the following commands in order to get non-root dialup: chmod u+s `which kppp` chmod u+s `which pppd` ...
  3. #2

    Default Re: chmod -- chomp not chmod!!

    Christiane Nerz wrote:
    > Oh-oh - there was a mistake - I tried chomp, not chmod..
    > How do I use chomp correctly? I have an array of strings, want to cut
    > off the last \n in each line and use the rest of the line. (concatenate
    > it to another string)
    > Jane
    >
    Return to the original thread [which you should have remained on, by replying to your own post or John''s] for a fairly simple solution.

    Joseph

    R. Joseph Newton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139