in reply to Removing data from a string with Regex

What you need is $from =~ s/@.+//g;; the ".+" matches everything from @ to the end of the string.

Scott

Minor update: Just to be clear, this is probably not the best way to do this, it just happens to work. Specifically, the .+ matches upto but not including the line feed that is at the end of the string, since it came along to $from from $_. In general, you would probably want to chomp $_ and then explicitly add a "\n" to your print statement, so that it is clear what you are doing.