To determine how many T-shirts the baseball team can buy with their budget of $265, we first need to divide the total amount of money by the cost of each T-shirt.
The cost of one T-shirt is $7, so we perform the following calculation:
\[
\text{Number of T-shirts} = \frac{\text{Total money}}{\text{Cost per T-shirt}} = \frac{265}{7}
\]
Calculating this gives:
\[
265 \div 7 = 37.8571
\]
Since we can only buy whole T-shirts, we round down to the nearest whole number, which is 37 T-shirts.
Next, we calculate how much money will be spent on 37 T-shirts:
\[
\text{Total cost} = \text{Number of T-shirts} \times \text{Cost per T-shirt} = 37 \times 7 = 259
\]
Now, we find out how much money will be left over after purchasing the T-shirts:
\[
\text{Money left over} = \text{Total money} - \text{Total cost} = 265 - 259
\]
Calculating this gives:
\[
\text{Money left over} = 6
\]
Therefore, the baseball team will have \(\boxed{6}\) dollars left over after buying as many T-shirts as possible.